summaryrefslogtreecommitdiff
authoralwin <alwin>2003-12-14 01:53:46 (UTC)
committer alwin <alwin>2003-12-14 01:53:46 (UTC)
commit898d1d9abda9889c3bb3adc44dd253e0a4ede746 (patch) (side-by-side diff)
tree8fb7afa554b94c0fe51723f8c2146859a705c2d7
parent52966e8b529e78ae431839abd90cec2ebb0d6dff (diff)
downloadopie-898d1d9abda9889c3bb3adc44dd253e0a4ede746.zip
opie-898d1d9abda9889c3bb3adc44dd253e0a4ede746.tar.gz
opie-898d1d9abda9889c3bb3adc44dd253e0a4ede746.tar.bz2
memleak fixed, some obsolet debugs removed
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp9
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp9
2 files changed, 16 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index a01a2a9..9ee0dff 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -288,27 +288,29 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
m->setBcc(addresslist);
}
if (head->env_reply_to!=NULL) {
addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
if (addresslist.count()) {
m->setReplyto(addresslist.first());
}
}
m->setMsgid(QString(head->env_message_id));
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
+#if 0
QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec);
qDebug(da.toString());
+#endif
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
size = item->att_data.att_static->att_data.att_rfc822_size;
}
}
/* msg is already deleted */
if (mFlags.testBit(FLAG_DELETED) && m) {
delete m;
m = 0;
}
if (m) {
m->setFlags(mFlags);
m->setMsgsize(size);
@@ -709,22 +711,27 @@ void IMAPwrapper::deleteMail(const RecMail&mail)
}
const char *mb = mail.getMbox().latin1();
err = mailimap_select( m_imap, (char*)mb);
if ( err != MAILIMAP_NO_ERROR ) {
qDebug("error selecting mailbox for delete: %s",m_imap->imap_response);
return;
}
flist = mailimap_flag_list_new_empty();
mailimap_flag_list_add(flist,mailimap_flag_new_deleted());
store_flags = mailimap_store_att_flags_new_set_flags(flist);
set = mailimap_set_new_single(mail.getNumber());
err = mailimap_store(m_imap,set,store_flags);
+ mailimap_set_free( set );
+ mailimap_store_att_flags_free(store_flags);
+
if (err != MAILIMAP_NO_ERROR) {
qDebug("error deleting mail: %s",m_imap->imap_response);
return;
}
+ qDebug("deleting mail: %s",m_imap->imap_response);
+ /* should we realy do that at this moment? */
err = mailimap_expunge(m_imap);
if (err != MAILIMAP_NO_ERROR) {
qDebug("error deleting mail: %s",m_imap->imap_response);
}
- qDebug("Delete successfull");
+ qDebug("Delete successfull %s",m_imap->imap_response);
}
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index a01a2a9..9ee0dff 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -288,27 +288,29 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
m->setBcc(addresslist);
}
if (head->env_reply_to!=NULL) {
addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
if (addresslist.count()) {
m->setReplyto(addresslist.first());
}
}
m->setMsgid(QString(head->env_message_id));
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
+#if 0
QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec);
qDebug(da.toString());
+#endif
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
size = item->att_data.att_static->att_data.att_rfc822_size;
}
}
/* msg is already deleted */
if (mFlags.testBit(FLAG_DELETED) && m) {
delete m;
m = 0;
}
if (m) {
m->setFlags(mFlags);
m->setMsgsize(size);
@@ -709,22 +711,27 @@ void IMAPwrapper::deleteMail(const RecMail&mail)
}
const char *mb = mail.getMbox().latin1();
err = mailimap_select( m_imap, (char*)mb);
if ( err != MAILIMAP_NO_ERROR ) {
qDebug("error selecting mailbox for delete: %s",m_imap->imap_response);
return;
}
flist = mailimap_flag_list_new_empty();
mailimap_flag_list_add(flist,mailimap_flag_new_deleted());
store_flags = mailimap_store_att_flags_new_set_flags(flist);
set = mailimap_set_new_single(mail.getNumber());
err = mailimap_store(m_imap,set,store_flags);
+ mailimap_set_free( set );
+ mailimap_store_att_flags_free(store_flags);
+
if (err != MAILIMAP_NO_ERROR) {
qDebug("error deleting mail: %s",m_imap->imap_response);
return;
}
+ qDebug("deleting mail: %s",m_imap->imap_response);
+ /* should we realy do that at this moment? */
err = mailimap_expunge(m_imap);
if (err != MAILIMAP_NO_ERROR) {
qDebug("error deleting mail: %s",m_imap->imap_response);
}
- qDebug("Delete successfull");
+ qDebug("Delete successfull %s",m_imap->imap_response);
}