[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] fix bug 43417
From:       Carsten Burghardt <cb () magic-shop ! de>
Date:       2002-09-01 9:33:35
[Download RAW message or body]

On Sunday 01 September 2002 10:33, Michael Häckel wrote:
> On Friday 30 August 2002 19:04, Carsten Burghardt wrote:
> > For sure but I need to find out when this listing should be triggered. So
> > it should be save to catch the most important errors and to trigger a
> > listDirectory. If I don't show a message I'm doing nothing wrong ;-). Or
> > do I miss something?
>
> Well, possibly serious performance problems when this is done too often.

If the user gets these errors very often he has other problems than 
performance ;-)

> To me currently two IMAP commands come into my mind which can give a hint
> that possibly the folder does not exist. That are the SELECT and the STATUS
> command.

Exactly.

> Since the IMAP protocol only knows two error codes:
> - BAD: Command not supported or invalid arguments
> - NO: Command didn't work successfully
> the kio slave obviously can't give more detailed information as it gets
> from the server.
>
> Ok, we could maybe agree, that the IMAP slave always returns
> ERR_CANNOT_ENTER_DIRECTORY if SELECT or STATUS fail and that this error
> message is reservered for that, but this should be documented then.

Right, that's what I wanted. Can you change that in the kioslave for these two 
commands (you know that thingy better)? My part would then look like the 
attached one.

> Currently we still always execute also a LIST command before selecting a
> folder which also could be used for that, but the IMAP slave should be
> fixed to not execute it, because it is not really neccesary.

A list-command _before_ selecting the folder?

> BTW: Please commit the job->errorText() part of your patch immediately, as
> it's definitely a serious bugfix.

Done.

-- 
Regards,

Carsten Burghardt
["deletefolder.diff" (text/x-diff)]

Index: kmacctimap.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmacctimap.cpp,v
retrieving revision 1.103
diff -u -3 -p -r1.103 kmacctimap.cpp
--- kmacctimap.cpp	2002/09/01 09:18:51	1.103
+++ kmacctimap.cpp	2002/09/01 09:31:15
@@ -366,6 +366,13 @@ void KMAcctImap::slotSlaveError(KIO::Sla
   if (aSlave != mSlave) return;
   if (errorCode == KIO::ERR_SLAVE_DIED) slaveDied();
   if (errorCode == KIO::ERR_COULD_NOT_LOGIN && !mStorePasswd) mAskAgain = TRUE;
+  if (errorCode == KIO::ERR_CANNOT_ENTER_DIRECTORY)
+  {
+    // reload the folderlist
+    if (mFolder) mFolder->listDirectory();
+    return;
+  }
+  killAllJobs();  
   // check if we still display an error
   if ( !errorDialogIsActive )
   {
@@ -378,7 +385,6 @@ void KMAcctImap::slotSlaveError(KIO::Sla
     }
   } else
     kdDebug() << "suppressing error:" << errorMsg << endl;
-  killAllJobs();
 }
 
 

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic