summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp12
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
@@ -788,10 +788,12 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
788 788
789 //enum { success, errorW, errorR, quiet }; 789 //enum { success, errorW, errorR, quiet };
790 if ( state == KCommandSocket::errorR ) { 790 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) {
791 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); 791 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") );
792 delete s; 792 delete s;
793 if ( state == KCommandSocket::errorR ) {
793 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); 794 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this );
794 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); 795 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
795 commandSocket->sendStop(); 796 commandSocket->sendStop();
797 }
796 return; 798 return;
797 799
@@ -1138,5 +1140,11 @@ void KCommandSocket::deleteSocket()
1138 mTimerSocket->stop(); 1140 mTimerSocket->stop();
1139 KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out!\nDid you forgot to enable\nsyncing on remote host? ")); 1141 KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out!\nDid you forgot to enable\nsyncing on remote host? "));
1140 mRetVal = errorR; 1142 mRetVal = errorTO;
1143 if ( mSocket ) {
1144 mSocket->close();
1145 if ( mSocket->state() == QSocket::Idle )
1146 deleteSocket();
1147 return;
1148 }
1141 } 1149 }
1142 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal ); 1150 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal );