author | zautrix <zautrix> | 2005-01-24 12:16:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 12:16:16 (UTC) |
commit | d4f5ce1bedd03191da5ecef2dc68381c10ef1fba (patch) (unidiff) | |
tree | 2d6860078083e588f8f365b308ee4ffb2c34f1c1 /kmicromail | |
parent | 485a6b28e3be6437742852970fdd122ba071b726 (diff) | |
download | kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.zip kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.gz kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.bz2 |
more imap fixes
-rw-r--r-- | kmicromail/libetpan/imap/mailimap_parser.c | 20 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 11 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 2 |
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 | |||
@@ -2399,9 +2399,27 @@ mailimap_body_fld_enc_parse(mailstream * fd, MMAPString * buffer, | |||
2399 | r = mailimap_string_parse(fd, buffer, &cur_token, &value, NULL, | 2399 | r = mailimap_string_parse(fd, buffer, &cur_token, &value, NULL, |
2400 | progr_rate, progr_fun); | 2400 | progr_rate, progr_fun); |
2401 | if (r != MAILIMAP_NO_ERROR) { | 2401 | if (r != MAILIMAP_NO_ERROR) { |
2402 | res = r; | 2402 | // LR start |
2403 | // accept NIL and set type to utf8 | ||
2404 | int ret = r; | ||
2405 | r = mailimap_char_parse(fd, buffer, &cur_token, 'N'); | ||
2406 | if (r == MAILIMAP_NO_ERROR) { | ||
2407 | r = mailimap_char_parse(fd, buffer, &cur_token, 'I'); | ||
2408 | if (r == MAILIMAP_NO_ERROR) { | ||
2409 | r = mailimap_char_parse(fd, buffer, &cur_token, 'L'); | ||
2410 | if (r == MAILIMAP_NO_ERROR) { | ||
2411 | type = 4; | ||
2412 | ret = MAILIMAP_NO_ERROR; | ||
2413 | value = NULL; | ||
2414 | } | ||
2415 | } | ||
2416 | } | ||
2417 | if ( ret != MAILIMAP_NO_ERROR ) { | ||
2418 | res = ret; | ||
2403 | goto err; | 2419 | goto err; |
2404 | } | 2420 | } |
2421 | // LR end | ||
2422 | } | ||
2405 | } | 2423 | } |
2406 | else { | 2424 | else { |
2407 | res = r; | 2425 | res = r; |
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 | |||
@@ -436,11 +436,12 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
436 | continue; | 436 | continue; |
437 | } | 437 | } |
438 | cf = flist->att_list->first; | 438 | cf = flist->att_list->first; |
439 | if( ! cf ) | 439 | if( cf ) { |
440 | for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { | 440 | for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { |
441 | cflag = (mailimap_flag_fetch*)cf->data; | 441 | cflag = (mailimap_flag_fetch*)cf->data; |
442 | if( ! cflag ) | 442 | if( ! cflag ) |
443 | qDebug("imap:not cflag "); | 443 | qDebug("imap:NO cflag "); |
444 | else { | ||
444 | if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { | 445 | if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { |
445 | switch (cflag->fl_flag->fl_type) { | 446 | switch (cflag->fl_flag->fl_type) { |
446 | case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ | 447 | case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ |
@@ -469,6 +470,9 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
469 | mFlags.setBit(FLAG_RECENT); | 470 | mFlags.setBit(FLAG_RECENT); |
470 | } | 471 | } |
471 | } | 472 | } |
473 | } | ||
474 | } | ||
475 | //qDebug(" continue"); | ||
472 | continue; | 476 | continue; |
473 | } | 477 | } |
474 | if ( item->att_data.att_static == NULL ) | 478 | if ( item->att_data.att_static == NULL ) |
@@ -485,6 +489,7 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
485 | size_t length = m->getDate().length(); | 489 | size_t length = m->getDate().length(); |
486 | size_t index = 0; | 490 | size_t index = 0; |
487 | if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { | 491 | if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { |
492 | //qDebug("parseDateTime "); | ||
488 | QDateTime dt = Genericwrapper::parseDateTime( date ); | 493 | QDateTime dt = Genericwrapper::parseDateTime( date ); |
489 | QString ret; | 494 | QString ret; |
490 | if ( dt.date() == QDate::currentDate () ) | 495 | if ( dt.date() == QDate::currentDate () ) |
@@ -607,7 +612,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) | |||
607 | body_desc = item->att_data.att_static->att_data.att_body; | 612 | body_desc = item->att_data.att_static->att_data.att_body; |
608 | traverseBody(mail,body_desc,body,0,path); | 613 | traverseBody(mail,body_desc,body,0,path); |
609 | } else { | 614 | } else { |
610 | //odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; | 615 | qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response ); |
611 | } | 616 | } |
612 | if (result) mailimap_fetch_list_free(result); | 617 | if (result) mailimap_fetch_list_free(result); |
613 | return body; | 618 | return body; |
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index c4731a7..d21696a 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp | |||
@@ -52,7 +52,7 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | |||
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); | 55 | nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this); |
56 | QLabel *spacer = new QLabel(toolbar); | 56 | QLabel *spacer = new QLabel(toolbar); |
57 | nextMail->addTo(toolbar); | 57 | nextMail->addTo(toolbar); |
58 | nextMail->addTo(mailmenu); | 58 | nextMail->addTo(mailmenu); |