Diffstat (limited to 'kmicromail/libetpan/generic/pop3driver.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libetpan/generic/pop3driver.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kmicromail/libetpan/generic/pop3driver.c b/kmicromail/libetpan/generic/pop3driver.c index 375879e..475dfcc 100644 --- a/kmicromail/libetpan/generic/pop3driver.c +++ b/kmicromail/libetpan/generic/pop3driver.c | |||
@@ -249,52 +249,55 @@ static int pop3driver_login(mailsession * session, | |||
249 | char * userid, char * password) | 249 | char * userid, char * password) |
250 | { | 250 | { |
251 | int r; | 251 | int r; |
252 | carray * msg_tab; | 252 | carray * msg_tab; |
253 | struct pop3_session_state_data * data; | 253 | struct pop3_session_state_data * data; |
254 | 254 | ||
255 | data = get_data(session); | 255 | data = get_data(session); |
256 | 256 | ||
257 | switch (data->pop3_auth_type) { | 257 | switch (data->pop3_auth_type) { |
258 | case POP3DRIVER_AUTH_TYPE_TRY_APOP: | 258 | case POP3DRIVER_AUTH_TYPE_TRY_APOP: |
259 | r = mailpop3_login_apop(get_pop3_session(session), userid, password); | 259 | r = mailpop3_login_apop(get_pop3_session(session), userid, password); |
260 | if (r != MAILPOP3_NO_ERROR) | 260 | if (r != MAILPOP3_NO_ERROR) |
261 | r = mailpop3_login(get_pop3_session(session), userid, password); | 261 | r = mailpop3_login(get_pop3_session(session), userid, password); |
262 | break; | 262 | break; |
263 | 263 | ||
264 | case POP3DRIVER_AUTH_TYPE_APOP: | 264 | case POP3DRIVER_AUTH_TYPE_APOP: |
265 | r = mailpop3_login_apop(get_pop3_session(session), userid, password); | 265 | r = mailpop3_login_apop(get_pop3_session(session), userid, password); |
266 | break; | 266 | break; |
267 | 267 | ||
268 | default: | 268 | default: |
269 | case POP3DRIVER_AUTH_TYPE_PLAIN: | 269 | case POP3DRIVER_AUTH_TYPE_PLAIN: |
270 | r = mailpop3_login(get_pop3_session(session), userid, password); | 270 | r = mailpop3_login(get_pop3_session(session), userid, password); |
271 | break; | 271 | break; |
272 | } | 272 | } |
273 | // LR 2 lines | ||
274 | int ret = pop3driver_pop3_error_to_mail_error(r); | ||
275 | if ( ret == MAIL_NO_ERROR ) | ||
276 | mailpop3_list(get_pop3_session(session), &msg_tab); | ||
273 | 277 | ||
274 | mailpop3_list(get_pop3_session(session), &msg_tab); | 278 | // LR |
275 | 279 | return ret; | |
276 | return pop3driver_pop3_error_to_mail_error(r); | ||
277 | } | 280 | } |
278 | 281 | ||
279 | static int pop3driver_logout(mailsession * session) | 282 | static int pop3driver_logout(mailsession * session) |
280 | { | 283 | { |
281 | int r; | 284 | int r; |
282 | 285 | ||
283 | r = mailpop3_quit(get_pop3_session(session)); | 286 | r = mailpop3_quit(get_pop3_session(session)); |
284 | 287 | ||
285 | return pop3driver_pop3_error_to_mail_error(r); | 288 | return pop3driver_pop3_error_to_mail_error(r); |
286 | } | 289 | } |
287 | 290 | ||
288 | static int pop3driver_noop(mailsession * session) | 291 | static int pop3driver_noop(mailsession * session) |
289 | { | 292 | { |
290 | int r; | 293 | int r; |
291 | 294 | ||
292 | r = mailpop3_noop(get_pop3_session(session)); | 295 | r = mailpop3_noop(get_pop3_session(session)); |
293 | 296 | ||
294 | return pop3driver_pop3_error_to_mail_error(r); | 297 | return pop3driver_pop3_error_to_mail_error(r); |
295 | } | 298 | } |
296 | 299 | ||
297 | static int pop3driver_status_folder(mailsession * session, char * mb, | 300 | static int pop3driver_status_folder(mailsession * session, char * mb, |
298 | uint32_t * result_messages, | 301 | uint32_t * result_messages, |
299 | uint32_t * result_recent, | 302 | uint32_t * result_recent, |
300 | uint32_t * result_unseen) | 303 | uint32_t * result_unseen) |