author | zautrix <zautrix> | 2004-10-07 13:41:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 13:41:15 (UTC) |
commit | bb8293c794d82a57bc93af85ccd89b601356d577 (patch) (side-by-side diff) | |
tree | 1b5112b9fda89888095bbb9934349c800865043c /libkdepim/ksyncmanager.cpp | |
parent | d14d61ebb2e41329465883a0dfce719d69fc3f3e (diff) | |
download | kdepimpi-bb8293c794d82a57bc93af85ccd89b601356d577.zip kdepimpi-bb8293c794d82a57bc93af85ccd89b601356d577.tar.gz kdepimpi-bb8293c794d82a57bc93af85ccd89b601356d577.tar.bz2 |
sync fixes
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 28af135..fad9a76 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -789,5 +789,6 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) //enum { success, errorW, errorR, quiet }; - if ( state == KCommandSocket::errorR ) { + if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) { mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); delete s; + if ( state == KCommandSocket::errorR ) { KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); @@ -795,2 +796,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) commandSocket->sendStop(); + } return; @@ -1139,3 +1141,9 @@ void KCommandSocket::deleteSocket() KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out!\nDid you forgot to enable\nsyncing on remote host? ")); - mRetVal = errorR; + mRetVal = errorTO; + if ( mSocket ) { + mSocket->close(); + if ( mSocket->state() == QSocket::Idle ) + deleteSocket(); + return; + } } |