summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp1
-rw-r--r--noncore/net/mail/pop3wrapper.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index 2aaff30..72f3c36 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -18,24 +18,25 @@ void POP3wrapper::pop3_progress( size_t current, size_t maximum )
18{ 18{
19 qDebug( "POP3: %i of %i", current, maximum ); 19 qDebug( "POP3: %i of %i", current, maximum );
20} 20}
21 21
22void POP3wrapper::listMessages( QList<RecMail> &target ) 22void POP3wrapper::listMessages( QList<RecMail> &target )
23{ 23{
24 int err = MAILPOP3_NO_ERROR; 24 int err = MAILPOP3_NO_ERROR;
25 char *header; 25 char *header;
26 size_t length; 26 size_t length;
27 carray *messages; 27 carray *messages;
28 28
29 login(); 29 login();
30 if (!m_pop3) return;
30 mailpop3_list( m_pop3, &messages ); 31 mailpop3_list( m_pop3, &messages );
31 32
32 for ( int i = carray_count( messages ); i > 0; i-- ) { 33 for ( int i = carray_count( messages ); i > 0; i-- ) {
33 mailpop3_msg_info *info = (mailpop3_msg_info *) carray_get( messages, i - 1 ); 34 mailpop3_msg_info *info = (mailpop3_msg_info *) carray_get( messages, i - 1 );
34 35
35 err = mailpop3_header( m_pop3, info->index, &header, &length ); 36 err = mailpop3_header( m_pop3, info->index, &header, &length );
36 if ( err != MAILPOP3_NO_ERROR ) { 37 if ( err != MAILPOP3_NO_ERROR ) {
37 qDebug( "POP3: error retrieving header msgid: %i", info->index ); 38 qDebug( "POP3: error retrieving header msgid: %i", info->index );
38 logout(); 39 logout();
39 return; 40 return;
40 } 41 }
41 RecMail *mail = parseHeader( header ); 42 RecMail *mail = parseHeader( header );
diff --git a/noncore/net/mail/pop3wrapper.cpp b/noncore/net/mail/pop3wrapper.cpp
index 2aaff30..72f3c36 100644
--- a/noncore/net/mail/pop3wrapper.cpp
+++ b/noncore/net/mail/pop3wrapper.cpp
@@ -18,24 +18,25 @@ void POP3wrapper::pop3_progress( size_t current, size_t maximum )
18{ 18{
19 qDebug( "POP3: %i of %i", current, maximum ); 19 qDebug( "POP3: %i of %i", current, maximum );
20} 20}
21 21
22void POP3wrapper::listMessages( QList<RecMail> &target ) 22void POP3wrapper::listMessages( QList<RecMail> &target )
23{ 23{
24 int err = MAILPOP3_NO_ERROR; 24 int err = MAILPOP3_NO_ERROR;
25 char *header; 25 char *header;
26 size_t length; 26 size_t length;
27 carray *messages; 27 carray *messages;
28 28
29 login(); 29 login();
30 if (!m_pop3) return;
30 mailpop3_list( m_pop3, &messages ); 31 mailpop3_list( m_pop3, &messages );
31 32
32 for ( int i = carray_count( messages ); i > 0; i-- ) { 33 for ( int i = carray_count( messages ); i > 0; i-- ) {
33 mailpop3_msg_info *info = (mailpop3_msg_info *) carray_get( messages, i - 1 ); 34 mailpop3_msg_info *info = (mailpop3_msg_info *) carray_get( messages, i - 1 );
34 35
35 err = mailpop3_header( m_pop3, info->index, &header, &length ); 36 err = mailpop3_header( m_pop3, info->index, &header, &length );
36 if ( err != MAILPOP3_NO_ERROR ) { 37 if ( err != MAILPOP3_NO_ERROR ) {
37 qDebug( "POP3: error retrieving header msgid: %i", info->index ); 38 qDebug( "POP3: error retrieving header msgid: %i", info->index );
38 logout(); 39 logout();
39 return; 40 return;
40 } 41 }
41 RecMail *mail = parseHeader( header ); 42 RecMail *mail = parseHeader( header );