author | zautrix <zautrix> | 2004-09-10 16:47:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-10 16:47:36 (UTC) |
commit | 157120031b77a3d9f10d780a66b6441dac1399fa (patch) (side-by-side diff) | |
tree | fe756e71b5290940d2824d06c11e5f887a6f00e2 | |
parent | 3b3e910d97287f6a538c114458d97800d430799a (diff) | |
download | kdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.zip kdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.tar.gz kdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.tar.bz2 |
Fixes in password dislog handling
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 18 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/nntpwrapper.cpp | 25 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/pop3wrapper.cpp | 18 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 19 |
4 files changed, 34 insertions, 46 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 11d3343..021633b 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -98,3 +98,3 @@ void IMAPwrapper::login() { - const char *server, *user, *pass; + QString server, user, pass; uint16_t port; @@ -114,3 +114,3 @@ void IMAPwrapper::login() } - server = account->getServer().latin1(); + server = account->getServer(); port = account->getPort().toUInt(); @@ -121,4 +121,4 @@ void IMAPwrapper::login() // ok - user = login.getUser().latin1(); - pass = login.getPassword().latin1(); + user = login.getUser(); + pass = login.getPassword(); } else { @@ -128,4 +128,4 @@ void IMAPwrapper::login() } else { - user = account->getUser().latin1(); - pass = account->getPassword().latin1(); + user = account->getUser(); + pass = account->getPassword(); } @@ -148,5 +148,5 @@ void IMAPwrapper::login() qDebug("using ssl "); - err = mailimap_ssl_connect( m_imap, (char*)server, port ); + err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); } else { - err = mailimap_socket_connect( m_imap, (char*)server, port ); + err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port ); } @@ -182,3 +182,3 @@ void IMAPwrapper::login() if (ok) { - err = mailimap_login_simple( m_imap, (char*)user, (char*)pass ); + err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() ); if ( err != MAILIMAP_NO_ERROR ) { diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp index f5d7f16..93cd2b5 100644 --- a/kmicromail/libmailwrapper/nntpwrapper.cpp +++ b/kmicromail/libmailwrapper/nntpwrapper.cpp @@ -119,3 +119,3 @@ void NNTPwrapper::login() - const char *server, *user, *pass; + QString server; QString User,Pass; @@ -124,7 +124,5 @@ void NNTPwrapper::login() - server = account->getServer().latin1(); + server = account->getServer(); port = account->getPort().toUInt(); - user = pass = 0; - if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) { @@ -134,4 +132,4 @@ void NNTPwrapper::login() // ok - User = login.getUser().latin1(); - Pass = login.getPassword().latin1(); + User = login.getUser(); + Pass = login.getPassword(); } else { @@ -142,13 +140,6 @@ void NNTPwrapper::login() } else { - User = account->getUser().latin1(); - Pass = account->getPassword().latin1(); + User = account->getUser(); + Pass = account->getPassword(); } - if (User.isEmpty()) { - user=0; - pass = 0; - } else { - user=User.latin1(); - pass=Pass.latin1(); - } // bool ssl = account->getSSL(); @@ -169,4 +160,4 @@ void NNTPwrapper::login() - nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN, - (char*)user,(char*)pass,0,0,0); + nntp_mailstorage_init(m_nntp,(char*)server.latin1(), port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN, + (char*)User.latin1(),(char*)Pass.latin1(),0,0,0); diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp index 0e6612c..f430121 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.cpp +++ b/kmicromail/libmailwrapper/pop3wrapper.cpp @@ -120,3 +120,3 @@ void POP3wrapper::login() - const char *server, *user, *pass; + QString server,user, pass; uint16_t port; @@ -132,4 +132,5 @@ void POP3wrapper::login() // ok - user = login.getUser().latin1(); - pass = login.getPassword().latin1(); + qDebug("ok "); + user = login.getUser(); + pass = login.getPassword(); } else { @@ -140,6 +141,5 @@ void POP3wrapper::login() } else { - user = account->getUser().latin1(); - pass = account->getPassword().latin1(); + user = account->getUser(); + pass = account->getPassword(); } - // bool ssl = account->getSSL(); @@ -147,3 +147,2 @@ void POP3wrapper::login() m_pop3=mailstorage_new(NULL); - int conntypeset = account->ConnectionType(); @@ -162,5 +161,4 @@ void POP3wrapper::login() - pop3_mailstorage_init(m_pop3,(char*)server, port, NULL, conntype, POP3_AUTH_TYPE_PLAIN, - (char*)user,(char*)pass,0,0,0); - + pop3_mailstorage_init(m_pop3,(char*)server.latin1(), port, NULL, conntype, POP3_AUTH_TYPE_PLAIN, + (char*)user.latin1(),(char*)pass.latin1(),0,0,0); diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 6a1b505..d5a528c 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp @@ -184,3 +184,3 @@ void SMTPwrapper::connect_server() { - const char *server, *user, *pass; + QString server, user, pass; bool ssl; @@ -190,3 +190,2 @@ void SMTPwrapper::connect_server() bool force_tls=false; - server = user = pass = 0; QString failuretext = ""; @@ -196,3 +195,3 @@ void SMTPwrapper::connect_server() } - server = m_SmtpAccount->getServer().latin1(); + server = m_SmtpAccount->getServer(); if ( m_SmtpAccount->ConnectionType() == 2 ) { @@ -217,6 +216,6 @@ void SMTPwrapper::connect_server() ; // odebug << "SSL session" << oendl; - err = mailsmtp_ssl_connect( m_smtp, server, port ); + err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); } else { ; // odebug << "No SSL session" << oendl; - err = mailsmtp_socket_connect( m_smtp, server, port ); + err = mailsmtp_socket_connect( m_smtp, server.latin1(), port ); } @@ -260,4 +259,4 @@ void SMTPwrapper::connect_server() // ok - user = login.getUser().latin1(); - pass = login.getPassword().latin1(); + user = login.getUser(); + pass = login.getPassword(); } else { @@ -267,4 +266,4 @@ void SMTPwrapper::connect_server() } else { - user = m_SmtpAccount->getUser().latin1(); - pass = m_SmtpAccount->getPassword().latin1(); + user = m_SmtpAccount->getUser(); + pass = m_SmtpAccount->getPassword(); } @@ -272,3 +271,3 @@ void SMTPwrapper::connect_server() if (result) { - err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); + err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() ); if ( err == MAILSMTP_NO_ERROR ) { |