-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 3e4293b..1caa375 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp @@ -134,13 +134,13 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) return enc; } void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) { if (current_rec >= 10) { - odebug << "too deep recursion!" << oendl; + odebug << "too deep recursion!" << oendl; } if (!message || !mime) { return; } int r; char*data = 0; @@ -271,13 +271,13 @@ QString Genericwrapper::parseAddressList( mailimf_address_list *list ) result.append( parseMailbox( addr->ad_data.ad_mailbox ) ); break; case MAILIMF_ADDRESS_GROUP: result.append( parseGroup( addr->ad_data.ad_group ) ); break; default: - odebug << "Generic: unkown mailimf address type" << oendl; + odebug << "Generic: unkown mailimf address type" << oendl; break; } } return result; } @@ -364,13 +364,13 @@ void Genericwrapper::cleanMimeCache() for (;it!=bodyCache.end();++it) { encodedString*t = it.data(); //it.setValue(0); if (t) delete t; } bodyCache.clear(); - odebug << "Genericwrapper: cache cleaned" << oendl; + odebug << "Genericwrapper: cache cleaned" << oendl; } QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) { QStringList res; if (!in_replies || !in_replies->mid_list) return res; @@ -393,18 +393,18 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) { int r; mailmessage_list * env_list = 0; r = mailsession_get_messages_list(session,&env_list); if (r != MAIL_NO_ERROR) { - odebug << "Error message list" << oendl; + odebug << "Error message list" << oendl; return; } r = mailsession_get_envelopes_list(session, env_list); if (r != MAIL_NO_ERROR) { - odebug << "Error filling message list" << oendl; + odebug << "Error filling message list" << oendl; if (env_list) { mailmessage_list_free(env_list); } return; } mailimf_references * refs = 0; @@ -412,13 +412,13 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & uint32_t i = 0; for(; i < carray_count(env_list->msg_tab) ; ++i) { mailmessage * msg; QBitArray mFlags(7); msg = (mailmessage*)carray_get(env_list->msg_tab, i); if (msg->msg_fields == NULL) { - //odebug << "could not fetch envelope of message " << i << "" << oendl; + //odebug << "could not fetch envelope of message " << i << "" << oendl; continue; } RecMailP mail = new RecMail(); mail->setWrapper(this); mail_flags * flag_result = 0; r = mailmessage_get_flags(msg,&flag_result); @@ -445,15 +445,14 @@ void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > & mail->setCC( parseAddressList( single_fields.fld_cc->cc_addr_list ) ); if (single_fields.fld_bcc) mail->setBcc( parseAddressList( single_fields.fld_bcc->bcc_addr_list ) ); if (single_fields.fld_orig_date) mail->setDate( parseDateTime( single_fields.fld_orig_date->dt_date_time ) ); // crashes when accessing pop3 account? - if (single_fields.fld_message_id->mid_value) { + if (single_fields.fld_message_id && single_fields.fld_message_id->mid_value) { mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); - odebug << "Msgid == " << mail->Msgid().latin1() << "" << oendl; } if (single_fields.fld_reply_to) { QStringList t = parseAddressList(single_fields.fld_reply_to->rt_addr_list); if (t.count()>0) { mail->setReplyto(t[0]); |