Bug 128361 - Korn can't delete pop3 mail
Summary: Korn can't delete pop3 mail
Status: RESOLVED FIXED
Alias: None
Product: korn
Classification: Miscellaneous
Component: general (show other bugs)
Version: 0.4
Platform: OpenSUSE Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Mart Kelder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-31 12:16 UTC by Francesco Locunto
Modified: 2006-06-21 10:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Locunto 2006-05-31 12:16:31 UTC
Version:           0.4 (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs
OS:                Linux

I've configured 5 pop3 accounts in korn, and these are managed perfectly. When new mail arrives, I can see new message list and even read the content of the selected mail, but if I try to delete the selected messages, korn simply do nothing.
More in-depth, korn seems to perform the action (a "delete progression" dialog appears, but just for a little moment, and then reload mails from the mailservers) but nothing happens, the message I want to delete is there, and I can fetch it with kmail...

Thanks in advance for help!

Francesco
Comment 1 Francesco Locunto 2006-06-20 18:58:05 UTC
I've just upgraded to kde 3.5.3, and the problem now is a bit different.
If a choose to delete a single message, all works pefectly, but if I choose to delete more than one message, korn succesfully deletes the first message of the list (sometimes it deletes 2 messages, but i can't guess when this happens...), and then stay forever, until i press the "Cancel" to terminate the operation. Cancelling the operation, i can see that only one or two messages are been deleted.
Comment 2 Francesco Locunto 2006-06-20 20:50:13 UTC
I've noticed that the problem occurs when deleting multiple messages from the same account. The problem doesn't occur when I delete e.g. 2 messages from 2 different accounts.
Comment 3 Mart Kelder 2006-06-20 22:34:00 UTC
Thanks for your report.

I can reproduce it and narrowed the possible causes. If seems that the list of messages which should be deleted are not correctly seperated. I will try to commit a fix soon (properbly tomorrow).

The origional bug you reported (in KDE 3.5.2) was caused by something else.
Comment 4 Mart Kelder 2006-06-21 10:55:12 UTC
SVN commit 553500 by mkelder:

- Changed email address.
- Corrected the making of a list of messages which have to be deleted for a given account.
  This will fix multiple messages removal from one server.

BUG: 128361


 M  +1 -1      main.cpp  
 M  +10 -2     subjectsdlg.cpp  


--- branches/KDE/3.5/kdepim/korn/main.cpp #553499:553500
@@ -25,7 +25,7 @@
 	aboutData.addAuthor("Rik Hemsley",0, "rik@kde.org");
 	aboutData.addAuthor("Fixes by Jörg Habenicht",0, "j.habenicht@europemail.com");
 	aboutData.addAuthor("Preview by Heiner Eichmann",0, "h.eichmann@gmx.de");
-	aboutData.addAuthor("Mart Kelder",0,"mart.kde@hccnet.nl");
+	aboutData.addAuthor("Mart Kelder",0,"mart@kelder31.nl");
 	
 	KCmdLineArgs::init( argc, argv, &aboutData );
 	KUniqueApplication::addCmdLineOptions();
--- branches/KDE/3.5/kdepim/korn/subjectsdlg.cpp #553499:553500
@@ -467,12 +467,20 @@
 {
 	_delete->ids->clear();
 	KornMailSubject *current;
-	for( current = _delete->messages->first(); current; current = _delete->messages->next() )
+	
+	for( current = _delete->messages->first(); current; )
+	{
 		if( current->getMailDrop() == drop )
 		{
 			_delete->ids->append( current->getId() );
-			_delete->messages->remove( current );
+			if( _delete->messages->remove( current ) ) 
+				current = _delete->messages->current(); //If successfull, current() is already the next message
+			else
+				current = _delete->messages->next(); // If removal failed, goto the next item 
+		} else {
+			current = _delete->messages->next();  //Goto next item
 		}
+	}
 }
 
 void KornSubjectsDlg::deleteNextMessage()