Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 9519d11..9cb9d7a 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -16,26 +16,26 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ //#define _XOPEN_SOURCE -#include <qtopia/global.h> +#include <opie2/oglobal.h> #include <qtopia/qpeapplication.h> #ifndef Q_OS_WIN32 #include <pwd.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #ifndef Q_OS_MACX #include <shadow.h> #include <crypt.h> -#endif /* Q_OS_MACX */ +#endif /* Q_OS_MACX */ #else #include <stdlib.h> #include <time.h> #endif @@ -60,13 +60,12 @@ #include <qtopia/quuid.h> #include <qtopia/version.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif -#include "launcherglobal.h" #include "transferserver.h" #include <qtopia/qprocess.h> const int block_size = 51200; @@ -111,13 +110,13 @@ QString SyncAuthentication::serverId() { Config cfg("Security"); cfg.setGroup("Sync"); QString r = cfg.readEntry("serverid"); if ( r.isEmpty() ) { - r = Opie::Global::uuid(); + r = OGlobal::generateUuid(); cfg.writeEntry("serverid", r ); } return r; } QString SyncAuthentication::ownerName() @@ -190,24 +189,24 @@ bool SyncAuthentication::checkPassword( const QString& password ) return TRUE; #endif static int lastdenial=0; static int denials=0; int now = time(0); - + Config cfg("Security"); - cfg.setGroup("Sync"); + cfg.setGroup("Sync"); QString syncapp = cfg.readEntry("syncapp","Qtopia"); - + //No password needed if the user really wants it if (syncapp == "IntelliSync") { return TRUE; - } - + } + // Detect old Qtopia Desktop (no password) - if ( password.isEmpty() ) { + if ( password.isEmpty() ) { if ( denials < 3 || now > lastdenial+600 ) { QMessageBox unauth( tr("Sync Connection"), tr("<p>An unauthorized system is requesting access to this device." "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " "please upgrade or change the security setting to use IntelliSync." ), @@ -216,23 +215,23 @@ bool SyncAuthentication::checkPassword( const QString& password ) 0, QString::null, TRUE, WStyle_StaysOnTop); unauth.setButtonText(QMessageBox::Cancel, tr("Deny")); unauth.exec(); denials++; lastdenial=now; - } + } return FALSE; - - } + + } // Second, check sync password... static int lock=0; if ( lock ) return FALSE; - ++lock; + ++lock; /* * we need to support old Sync software and QtopiaDesktop */ if ( password.left(6) == "Qtopia" || password.left(6) == "rootme" ) { Config cfg( "Security" ); |