author | alwin <alwin> | 2004-01-06 22:30:50 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-06 22:30:50 (UTC) |
commit | a545ea9b957c14bdf9d8aa20e64457b64841ce7f (patch) (unidiff) | |
tree | aae2cd99718cd0378bf0a53613e2a663d2dd2add | |
parent | a24b39a49ac49d2d3b0f2ff53f0f3b7839447d6e (diff) | |
download | opie-a545ea9b957c14bdf9d8aa20e64457b64841ce7f.zip opie-a545ea9b957c14bdf9d8aa20e64457b64841ce7f.tar.gz opie-a545ea9b957c14bdf9d8aa20e64457b64841ce7f.tar.bz2 |
some more debug infos
memleaks fixed
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index 00181ff..4764b77 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -540,3 +540,3 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
540 | { | 540 | { |
541 | char *server, *user, *pass; | 541 | const char *server, *user, *pass; |
542 | bool ssl; | 542 | bool ssl; |
@@ -548,3 +548,3 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
548 | server = user = pass = 0; | 548 | server = user = pass = 0; |
549 | server = strdup( smtp->getServer().latin1() ); | 549 | server = smtp->getServer().latin1(); |
550 | ssl = smtp->getSSL(); | 550 | ssl = smtp->getSSL(); |
@@ -563,3 +563,3 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
563 | } | 563 | } |
564 | if ( err != MAILSMTP_NO_ERROR ) {result = 0;goto free_mem_session;} | 564 | if ( err != MAILSMTP_NO_ERROR ) {qDebug("Error init connection");result = 0;goto free_mem_session;} |
565 | 565 | ||
@@ -571,2 +571,3 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
571 | if ( smtp->getLogin() ) { | 571 | if ( smtp->getLogin() ) { |
572 | qDebug("smtp with auth"); | ||
572 | if ( smtp->getUser().isEmpty() || smtp->getPassword().isEmpty() ) { | 573 | if ( smtp->getUser().isEmpty() || smtp->getPassword().isEmpty() ) { |
@@ -577,4 +578,4 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
577 | // ok | 578 | // ok |
578 | user = strdup( login.getUser().latin1() ); | 579 | user = login.getUser().latin1(); |
579 | pass = strdup( login.getPassword().latin1() ); | 580 | pass = login.getPassword().latin1(); |
580 | } else { | 581 | } else { |
@@ -583,9 +584,11 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMT | |||
583 | } else { | 584 | } else { |
584 | user = strdup( smtp->getUser().latin1() ); | 585 | user = smtp->getUser().latin1(); |
585 | pass = strdup( smtp->getPassword().latin1() ); | 586 | pass = smtp->getPassword().latin1(); |
586 | } | 587 | } |
587 | qDebug( "session->auth: %i", session->auth); | 588 | qDebug( "session->auth: %i", session->auth); |
588 | err = mailsmtp_auth( session, user, pass ); | 589 | err = mailsmtp_auth( session, (char*)user, (char*)pass ); |
589 | if ( err == MAILSMTP_NO_ERROR ) qDebug("auth ok"); | 590 | if ( err == MAILSMTP_NO_ERROR ) qDebug("auth ok"); |
590 | qDebug( "Done auth!" ); | 591 | qDebug( "Done auth!" ); |
592 | } else { | ||
593 | qDebug("SMTP without auth"); | ||
591 | } | 594 | } |
@@ -606,7 +609,2 @@ free_mem_session: | |||
606 | free_mem: | 609 | free_mem: |
607 | if (server) free( server ); | ||
608 | if ( smtp->getLogin() ) { | ||
609 | free( user ); | ||
610 | free( pass ); | ||
611 | } | ||
612 | return result; | 610 | return result; |