View | Details | Raw Unified | Return to bug 247903
Collapse All | Expand All

(-)kmail/imapaccountbase.cpp (-12 / +13 lines)
Lines 550-568 Link Here
550
    if (aSlave != mSlave) return;
550
    if (aSlave != mSlave) return;
551
    handleError( errorCode, errorMsg, 0, QString::null, true );
551
    handleError( errorCode, errorMsg, 0, QString::null, true );
552
    if ( mAskAgain )
552
    if ( mAskAgain )
553
      makeConnection();
553
      if ( makeConnection() != ImapAccountBase::Error )
554
    else {
554
        return;
555
      if ( !mSlaveConnected ) {
555
556
        mSlaveConnectionError = true;
556
    if ( !mSlaveConnected ) {
557
        resetConnectionList( this );
557
      mSlaveConnectionError = true;
558
        if ( mSlave )
558
      resetConnectionList( this );
559
        {
559
      if ( mSlave )
560
          KIO::Scheduler::disconnectSlave( slave() );
560
      {
561
          mSlave = 0;
561
        KIO::Scheduler::disconnectSlave( slave() );
562
        }
562
        mSlave = 0;
563
      }
563
      }
564
      emit connectionResult( errorCode, errorMsg );
565
    }
564
    }
565
    emit connectionResult( errorCode, errorMsg );
566
  }
566
  }
567
567
568
  //-----------------------------------------------------------------------------
568
  //-----------------------------------------------------------------------------
Lines 880-886 Link Here
880
    bool jobsKilled = true;
880
    bool jobsKilled = true;
881
    switch( errorCode ) {
881
    switch( errorCode ) {
882
    case KIO::ERR_SLAVE_DIED: slaveDied(); killAllJobs( true ); break;
882
    case KIO::ERR_SLAVE_DIED: slaveDied(); killAllJobs( true ); break;
883
    case KIO::ERR_COULD_NOT_LOGIN: // bad password
883
    case KIO::ERR_COULD_NOT_AUTHENTICATE: // bad password
884
      mAskAgain = true;
884
      mAskAgain = true;
885
      // fallthrough intended
885
      // fallthrough intended
886
    case KIO::ERR_CONNECTION_BROKEN:
886
    case KIO::ERR_CONNECTION_BROKEN:
Lines 889-894 Link Here
889
      // These mean that we'll have to reconnect on the next attempt, so disconnect and set mSlave to 0.
889
      // These mean that we'll have to reconnect on the next attempt, so disconnect and set mSlave to 0.
890
      killAllJobs( true );
890
      killAllJobs( true );
891
      break;
891
      break;
892
    case KIO::ERR_COULD_NOT_LOGIN:
892
    case KIO::ERR_USER_CANCELED:
893
    case KIO::ERR_USER_CANCELED:
893
      killAllJobs( false );
894
      killAllJobs( false );
894
      break;
895
      break;

Return to bug 247903