-rw-r--r-- | libkdepim/ksyncmanager.cpp | 22 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 2 |
2 files changed, 17 insertions, 7 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 47d00a4..d59f4a4 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1076,3 +1076,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW || - state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN ) { + state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) { if ( state == KCommandSocket::errorPW ) @@ -1085,2 +1085,4 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) mParent->topLevelWidget()->setCaption( i18n("File error on remote.") ); + else if ( state == KCommandSocket::errorED ) + mParent->topLevelWidget()->setCaption( i18n("Please close error dialog on remote.") ); else if ( state == KCommandSocket::errorUN ) @@ -1185,3 +1187,3 @@ void KServerSocket::readClient() mErrorMessage = 999; - error_connect("ERROR_UN\r\n\r\n"); + error_connect("ERROR_ED\r\n\r\n"); return; @@ -1231,7 +1233,10 @@ void KServerSocket::displayErrorMessage() { - if ( mErrorMessage == 1 ) + if ( mErrorMessage == 1 ) { KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); - else if ( mErrorMessage == 2 ) + mErrorMessage = 0; + } + else if ( mErrorMessage == 2 ) { KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); - mErrorMessage = 0; + mErrorMessage = 0; + } } @@ -1267,3 +1272,3 @@ void KServerSocket::send_file() int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); - secs = 333; + //secs = 333; if ( secs < 0 ) @@ -1523,2 +1528,7 @@ void KCommandSocket::readFileFromSocket() } + if ( line.left( 8 ) == "ERROR_ED" ) { + mRetVal = errorED; + deleteSocket(); + return ; + } mRetVal = errorUN; diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index bd3ecdc..30ec1e6 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -80,3 +80,3 @@ class KCommandSocket : public QObject public: - enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN,quiet }; + enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet }; KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); |