summaryrefslogtreecommitdiff
path: root/noncore/net/mail/imapwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index 853e4a2..0178e33 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -95,11 +95,11 @@ void IMAPwrapper::logout()
95void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) 95void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
96{ 96{
97 const char *mb; 97 const char *mb = 0;
98 int err = MAILIMAP_NO_ERROR; 98 int err = MAILIMAP_NO_ERROR;
99 clist *result; 99 clist *result = 0;
100 clistcell *current; 100 clistcell *current;
101// mailimap_fetch_att *fetchAtt,*fetchAttFlags,*fetchAttDate,*fetchAttSize; 101// mailimap_fetch_att *fetchAtt,*fetchAttFlags,*fetchAttDate,*fetchAttSize;
102 mailimap_fetch_type *fetchType; 102 mailimap_fetch_type *fetchType = 0;
103 mailimap_set *set; 103 mailimap_set *set = 0;
104 104
105 mb = mailbox.latin1(); 105 mb = mailbox.latin1();
@@ -122,5 +122,4 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
122 } 122 }
123 123
124 result = clist_new();
125 /* the range has to start at 1!!! not with 0!!!! */ 124 /* the range has to start at 1!!! not with 0!!!! */
126 set = mailimap_set_new_interval( 1, last ); 125 set = mailimap_set_new_interval( 1, last );
@@ -138,5 +137,4 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
138 137
139 if ( err == MAILIMAP_NO_ERROR ) { 138 if ( err == MAILIMAP_NO_ERROR ) {
140
141 mailimap_msg_att * msg_att; 139 mailimap_msg_att * msg_att;
142 int i = 0; 140 int i = 0;
@@ -155,5 +153,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
155 qDebug("Error fetching headers: %s",m_imap->imap_response); 153 qDebug("Error fetching headers: %s",m_imap->imap_response);
156 } 154 }
157 mailimap_fetch_list_free(result); 155 if (result) mailimap_fetch_list_free(result);
158} 156}
159 157