-rw-r--r-- | libkdepim/ksyncmanager.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 02e5587..08a263c 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1054,2 +1054,3 @@ void KSyncManager::syncPi() mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); + mPisyncFinished = true; return; @@ -1060,2 +1061,3 @@ void KSyncManager::syncPi() mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); + mPisyncFinished = true; return; @@ -1091,2 +1093,8 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) mPisyncFinished = true; + } else if ( state == KCommandSocket::quiet ){ + qDebug("KSS: quiet "); + mPisyncFinished = true; + } else { + qDebug("KSS: Error: unknown state: %d ", state); + mPisyncFinished = true; } @@ -1273,4 +1281,5 @@ void KServerSocket::send_file() while ( ! ts.atEnd() ) { - os << ts.readLine() << "\r\n\r\n"; + os << ts.readLine() << "\r\n"; } + os << "\r\n"; //os << ts.read(); @@ -1376,5 +1385,5 @@ void KCommandSocket::readFile( QString fn ) tlw->setCaption( i18n("Trying to connect to remote...") ); + mTimerSocket->start( 20000 ); mSocket->connectToHost( mHost, mPort ); qDebug("KSS: Waiting for connection"); - mTimerSocket->start( 20000 ); } @@ -1389,2 +1398,3 @@ void KCommandSocket::writeFile( QString fileName ) mFileName = fileName ; + mTimerSocket->start( 20000 ); mSocket->connectToHost( mHost, mPort ); @@ -1393,2 +1403,3 @@ void KCommandSocket::writeFileToSocket() { + mTimerSocket->stop(); QFile file2( mFileName ); @@ -1407,4 +1418,5 @@ void KCommandSocket::writeFileToSocket() while ( ! ts2.atEnd() ) { - os2 << ts2.readLine() << "\r\n\r\n"; + os2 << ts2.readLine() << "\r\n"; } + os2 << "\r\n"; mRetVal= successW; |