summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp11
1 files changed, 8 insertions, 3 deletions
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
@@ -435,13 +435,14 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
if (!flist || !flist->att_list) {
continue;
}
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) {
case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */
mFlags.setBit(FLAG_ANSWERED);
@@ -468,8 +469,11 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
} else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) {
mFlags.setBit(FLAG_RECENT);
}
}
+ }
+ }
+ //qDebug(" continue");
continue;
}
if ( item->att_data.att_static == NULL )
continue;
@@ -484,8 +488,9 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
struct mailimf_date_time **re = &date;
size_t length = m->getDate().length();
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;
if ( dt.date() == QDate::currentDate () )
ret = KGlobal::locale()->formatTime( dt.time(),true);
@@ -606,9 +611,9 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
QValueList<int> path;
body_desc = item->att_data.att_static->att_data.att_body;
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);
return body;
}