Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 12 |
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 | |||
@@ -94,13 +94,13 @@ void IMAPwrapper::logout() | |||
94 | 94 | ||
95 | void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) | 95 | void 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(); |
106 | login(); | 106 | login(); |
@@ -121,7 +121,6 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) | |||
121 | return; | 121 | return; |
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 ); |
127 | fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); | 126 | fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); |
@@ -137,7 +136,6 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) | |||
137 | QString date,subject,from; | 136 | QString date,subject,from; |
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; |
143 | for (current = clist_begin(result); current != 0; current=clist_next(current)) { | 141 | for (current = clist_begin(result); current != 0; current=clist_next(current)) { |
@@ -154,7 +152,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) | |||
154 | } else { | 152 | } else { |
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 | ||
160 | QList<Folder>* IMAPwrapper::listFolders() | 158 | QList<Folder>* IMAPwrapper::listFolders() |