summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Lohrke <carlo@gentoo.org>2006-05-01 14:00:20 +0000
committerCarsten Lohrke <carlo@gentoo.org>2006-05-01 14:00:20 +0000
commit47ca64aa355289907d28b29621e8ae2fed6fcd0d (patch)
treea2ea3cb7275f525d1b9ca29920006cf3642d7e94 /kde-base/kdepim-kioslaves/files
parentakode use flag for juk and kttsd (diff)
downloadgentoo-2-47ca64aa355289907d28b29621e8ae2fed6fcd0d.tar.gz
gentoo-2-47ca64aa355289907d28b29621e8ae2fed6fcd0d.tar.bz2
gentoo-2-47ca64aa355289907d28b29621e8ae2fed6fcd0d.zip
Play nice with broken imap servers.
(Portage version: 2203-svn)
Diffstat (limited to 'kde-base/kdepim-kioslaves/files')
-rw-r--r--kde-base/kdepim-kioslaves/files/digest-kdepim-kioslaves-3.5.2-r21
-rw-r--r--kde-base/kdepim-kioslaves/files/kdepim-kioslaves-3.5.2-fixes-2.diff98
2 files changed, 99 insertions, 0 deletions
diff --git a/kde-base/kdepim-kioslaves/files/digest-kdepim-kioslaves-3.5.2-r2 b/kde-base/kdepim-kioslaves/files/digest-kdepim-kioslaves-3.5.2-r2
new file mode 100644
index 000000000000..9ee81dd048d6
--- /dev/null
+++ b/kde-base/kdepim-kioslaves/files/digest-kdepim-kioslaves-3.5.2-r2
@@ -0,0 +1 @@
+MD5 ac6b3b503e27a65a7b883c1e0a57262e kdepim-3.5.2.tar.bz2 12887336
diff --git a/kde-base/kdepim-kioslaves/files/kdepim-kioslaves-3.5.2-fixes-2.diff b/kde-base/kdepim-kioslaves/files/kdepim-kioslaves-3.5.2-fixes-2.diff
new file mode 100644
index 000000000000..3c492756af59
--- /dev/null
+++ b/kde-base/kdepim-kioslaves/files/kdepim-kioslaves-3.5.2-fixes-2.diff
@@ -0,0 +1,98 @@
+--- kdepim/kioslaves/mbox/readmbox.cc 2005/12/27 12:43:58 491743
++++ kdepim/kioslaves/mbox/readmbox.cc 2006/04/14 17:45:24 529892
+@@ -142,8 +142,10 @@
+
+ void ReadMBox::rewind()
+ {
+- if( m_stream )
+- m_stream->device()->reset();
++ if( !m_stream )
++ return; //Rewinding not possible
++
++ m_stream->device()->reset();
+ m_atend = m_stream->atEnd();
+ }
+
+@@ -178,6 +180,7 @@
+ if( !m_file->open( IO_ReadOnly ) )
+ {
+ delete m_file;
++ m_file = 0;
+ return false;
+ }
+ m_stream = new QTextStream( m_file );
+--- kdepim/kioslaves/imap4/imap4.cc 2005/09/14 19:43:34 460690
++++ kdepim/kioslaves/imap4/imap4.cc 2006/04/24 19:41:11 533427
+@@ -1988,6 +1988,17 @@
+ if (cmd->result () == "OK")
+ {
+ QValueListIterator < imapList > it = listResponses.begin();
++ if ( it == listResponses.end() )
++ {
++ // empty answer - this is a buggy imap server
++ // as a fallback we fire a normal listing and take the first answer
++ completeQueue.removeRef (cmd);
++ cmd = doCommand( imapCommand::clientList("", "%") );
++ if (cmd->result () == "OK")
++ {
++ it = listResponses.begin();
++ }
++ }
+ if ( it != listResponses.end() )
+ {
+ namespaceToDelimiter[QString::null] = (*it).hierarchyDelimiter();
+@@ -2232,6 +2243,10 @@
+ path += item.hierarchyDelimiter();
+ }
+ path += mailboxName;
++ if (path.upper() == "/INBOX/") {
++ // make sure the client can rely on INBOX
++ path = path.upper();
++ }
+ }
+ aURL.setPath(path);
+ atom.m_str = aURL.url(0, 106); // utf-8
+--- kdepim/kioslaves/imap4/imapparser.cc 2006/03/14 18:28:14 518628
++++ kdepim/kioslaves/imap4/imapparser.cc 2006/04/28 08:08:27 534960
+@@ -729,7 +729,7 @@
+ lastStatus = imapInfo ();
+
+ parseLiteralC(inWords); // swallow the box
+- if (inWords[0] != '(')
++ if (inWords.isEmpty() || inWords[0] != '(')
+ return;
+
+ inWords.pos++;
+@@ -1745,10 +1745,15 @@
+ {
+ QString temp = (*it);
+
+- // if we have a '/' separator we'll just nuke it
+ int pt = temp.find ('/');
+- if (pt > 0)
+- temp.truncate(pt);
++ if (pt > 0)
++ {
++ if (temp.findRev ('"', pt) == -1 || temp.find('"', pt) == -1)
++ {
++ // if we have non-quoted '/' separator we'll just nuke it
++ temp.truncate(pt);
++ }
++ }
+ if (temp.find ("section=", 0, false) == 0)
+ _section = temp.right (temp.length () - 8);
+ else if (temp.find ("type=", 0, false) == 0)
+--- kdepim/kioslaves/imap4/rfcdecoder.cc 2005/07/26 18:54:59 438982
++++ kdepim/kioslaves/imap4/rfcdecoder.cc 2006/04/26 23:20:45 534373
+@@ -589,8 +589,10 @@
+ break;
+ l++;
+ }
+- if (!*l)
++ if (!*l) {
++ free(latin);
+ return _str.ascii ();
++ }
+ QCString result;
+ l = latin;
+ while (*l)