summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-01-24 12:16:16 (UTC)
committer zautrix <zautrix>2005-01-24 12:16:16 (UTC)
commitd4f5ce1bedd03191da5ecef2dc68381c10ef1fba (patch) (side-by-side diff)
tree2d6860078083e588f8f365b308ee4ffb2c34f1c1 /kmicromail
parent485a6b28e3be6437742852970fdd122ba071b726 (diff)
downloadkdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.zip
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.gz
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.bz2
more imap fixes
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libetpan/imap/mailimap_parser.c20
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp11
-rw-r--r--kmicromail/viewmailbase.cpp2
3 files changed, 28 insertions, 5 deletions
diff --git a/kmicromail/libetpan/imap/mailimap_parser.c b/kmicromail/libetpan/imap/mailimap_parser.c
index 1c2ecde..560e58a 100644
--- a/kmicromail/libetpan/imap/mailimap_parser.c
+++ b/kmicromail/libetpan/imap/mailimap_parser.c
@@ -2400,7 +2400,25 @@ mailimap_body_fld_enc_parse(mailstream * fd, MMAPString * buffer,
progr_rate, progr_fun);
if (r != MAILIMAP_NO_ERROR) {
- res = r;
+ // LR start
+ // accept NIL and set type to utf8
+ int ret = r;
+ r = mailimap_char_parse(fd, buffer, &cur_token, 'N');
+ if (r == MAILIMAP_NO_ERROR) {
+ r = mailimap_char_parse(fd, buffer, &cur_token, 'I');
+ if (r == MAILIMAP_NO_ERROR) {
+ r = mailimap_char_parse(fd, buffer, &cur_token, 'L');
+ if (r == MAILIMAP_NO_ERROR) {
+ type = 4;
+ ret = MAILIMAP_NO_ERROR;
+ value = NULL;
+ }
+ }
+ }
+ if ( ret != MAILIMAP_NO_ERROR ) {
+ res = ret;
goto err;
}
+ // LR end
+ }
}
else {
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index d9496af..93fb7de 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -437,9 +437,10 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
}
cf = flist->att_list->first;
- if( ! cf )
+ if( cf ) {
for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) {
cflag = (mailimap_flag_fetch*)cf->data;
if( ! cflag )
- qDebug("imap:not cflag ");
+ qDebug("imap:NO cflag ");
+ else {
if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) {
switch (cflag->fl_flag->fl_type) {
@@ -470,4 +471,7 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
}
}
+ }
+ }
+ //qDebug(" continue");
continue;
}
@@ -486,4 +490,5 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
size_t index = 0;
if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) {
+ //qDebug("parseDateTime ");
QDateTime dt = Genericwrapper::parseDateTime( date );
QString ret;
@@ -608,5 +613,5 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
traverseBody(mail,body_desc,body,0,path);
} else {
- //odebug << "error fetching body: " << m_imap->imap_response << "" << oendl;
+ qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response );
}
if (result) mailimap_fetch_list_free(result);
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index c4731a7..d21696a 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -53,5 +53,5 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
- nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this);
+ nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
QLabel *spacer = new QLabel(toolbar);
nextMail->addTo(toolbar);