author | mickeyl <mickeyl> | 2003-11-18 18:43:25 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-11-18 18:43:25 (UTC) |
commit | 22966b4e27b5460e005bb47b914264495f3f17bf (patch) (unidiff) | |
tree | 28611cac21ec8ede6c9a27e8e238007c5f7b3249 /core/launcher/transferserver.cpp | |
parent | 6b50f01126f1e22ed1cebef7db2901c7ff33116f (diff) | |
download | opie-22966b4e27b5460e005bb47b914264495f3f17bf.zip opie-22966b4e27b5460e005bb47b914264495f3f17bf.tar.gz opie-22966b4e27b5460e005bb47b914264495f3f17bf.tar.bz2 |
Increase sync-friendlyness and repair broken sync with several
programs. Patch by Matthias Hentges <matthias@hentges.net> - thanks!
Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 439e110..eea9f3a 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -191,30 +191,40 @@ bool SyncAuthentication::checkPassword( const QString& password ) | |||
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | static int lastdenial=0; | 193 | static int lastdenial=0; |
194 | static int denials=0; | 194 | static int denials=0; |
195 | int now = time(0); | 195 | int now = time(0); |
196 | 196 | ||
197 | Config cfg("Security"); | ||
198 | cfg.setGroup("Sync"); | ||
199 | QString syncapp = cfg.readEntry("syncapp","Qtopia"); | ||
200 | |||
201 | //No password needed if the user really wants it | ||
202 | if (syncapp == "IntelliSync") { | ||
203 | return TRUE; | ||
204 | } | ||
205 | |||
197 | // Detect old Qtopia Desktop (no password) | 206 | // Detect old Qtopia Desktop (no password) |
198 | if ( password.isEmpty() ) { | 207 | if ( password.isEmpty() ) { |
199 | if ( denials < 1 || now > lastdenial+600 ) { | 208 | if ( denials < 3 || now > lastdenial+600 ) { |
200 | QMessageBox unauth( | 209 | QMessageBox unauth( |
201 | tr("Sync Connection"), | 210 | tr("Sync Connection"), |
202 | tr("<p>An unauthorized system is requesting access to this device." | 211 | tr("<p>An unauthorized system is requesting access to this device." |
203 | "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " | 212 | "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " |
204 | "please upgrade."), | 213 | "please upgrade or change the security setting to use IntelliSync." ), |
205 | QMessageBox::Warning, | 214 | QMessageBox::Warning, |
206 | QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton, | 215 | QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton, |
207 | 0, QString::null, TRUE, WStyle_StaysOnTop); | 216 | 0, QString::null, TRUE, WStyle_StaysOnTop); |
208 | unauth.setButtonText(QMessageBox::Cancel, tr("Deny")); | 217 | unauth.setButtonText(QMessageBox::Cancel, tr("Deny")); |
209 | unauth.exec(); | 218 | unauth.exec(); |
210 | 219 | ||
211 | denials++; | 220 | denials++; |
212 | lastdenial=now; | 221 | lastdenial=now; |
213 | } | 222 | } |
214 | return FALSE; | 223 | return FALSE; |
224 | |||
215 | } | 225 | } |
216 | 226 | ||
217 | // Second, check sync password... | 227 | // Second, check sync password... |
218 | 228 | ||
219 | static int lock=0; | 229 | static int lock=0; |
220 | if ( lock ) return FALSE; | 230 | if ( lock ) return FALSE; |