summaryrefslogtreecommitdiff
path: root/core/launcher/transferserver.cpp
Unidiff
Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp27
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
@@ -19,7 +19,7 @@
19**********************************************************************/ 19**********************************************************************/
20//#define _XOPEN_SOURCE 20//#define _XOPEN_SOURCE
21 21
22#include <qtopia/global.h> 22#include <opie2/oglobal.h>
23#include <qtopia/qpeapplication.h> 23#include <qtopia/qpeapplication.h>
24 24
25#ifndef Q_OS_WIN32 25#ifndef Q_OS_WIN32
@@ -32,7 +32,7 @@
32#ifndef Q_OS_MACX 32#ifndef Q_OS_MACX
33#include <shadow.h> 33#include <shadow.h>
34#include <crypt.h> 34#include <crypt.h>
35#endif /* Q_OS_MACX */ 35#endif /* Q_OS_MACX */
36 36
37#else 37#else
38#include <stdlib.h> 38#include <stdlib.h>
@@ -63,7 +63,6 @@
63#include <qtopia/qcopenvelope_qws.h> 63#include <qtopia/qcopenvelope_qws.h>
64#endif 64#endif
65 65
66#include "launcherglobal.h"
67 66
68#include "transferserver.h" 67#include "transferserver.h"
69#include <qtopia/qprocess.h> 68#include <qtopia/qprocess.h>
@@ -114,7 +113,7 @@ QString SyncAuthentication::serverId()
114 QString r = cfg.readEntry("serverid"); 113 QString r = cfg.readEntry("serverid");
115 114
116 if ( r.isEmpty() ) { 115 if ( r.isEmpty() ) {
117 r = Opie::Global::uuid(); 116 r = OGlobal::generateUuid();
118 cfg.writeEntry("serverid", r ); 117 cfg.writeEntry("serverid", r );
119 } 118 }
120 return r; 119 return r;
@@ -193,18 +192,18 @@ bool SyncAuthentication::checkPassword( const QString& password )
193 static int lastdenial=0; 192 static int lastdenial=0;
194 static int denials=0; 193 static int denials=0;
195 int now = time(0); 194 int now = time(0);
196 195
197 Config cfg("Security"); 196 Config cfg("Security");
198 cfg.setGroup("Sync"); 197 cfg.setGroup("Sync");
199 QString syncapp = cfg.readEntry("syncapp","Qtopia"); 198 QString syncapp = cfg.readEntry("syncapp","Qtopia");
200 199
201 //No password needed if the user really wants it 200 //No password needed if the user really wants it
202 if (syncapp == "IntelliSync") { 201 if (syncapp == "IntelliSync") {
203 return TRUE; 202 return TRUE;
204 } 203 }
205 204
206 // Detect old Qtopia Desktop (no password) 205 // Detect old Qtopia Desktop (no password)
207 if ( password.isEmpty() ) { 206 if ( password.isEmpty() ) {
208 if ( denials < 3 || now > lastdenial+600 ) { 207 if ( denials < 3 || now > lastdenial+600 ) {
209 QMessageBox unauth( 208 QMessageBox unauth(
210 tr("Sync Connection"), 209 tr("Sync Connection"),
@@ -219,17 +218,17 @@ bool SyncAuthentication::checkPassword( const QString& password )
219 218
220 denials++; 219 denials++;
221 lastdenial=now; 220 lastdenial=now;
222 } 221 }
223 return FALSE; 222 return FALSE;
224 223
225 } 224 }
226 225
227 // Second, check sync password... 226 // Second, check sync password...
228 227
229 static int lock=0; 228 static int lock=0;
230 if ( lock ) return FALSE; 229 if ( lock ) return FALSE;
231 230
232 ++lock; 231 ++lock;
233 232
234 /* 233 /*
235 * we need to support old Sync software and QtopiaDesktop 234 * we need to support old Sync software and QtopiaDesktop