author | zautrix <zautrix> | 2004-09-10 16:47:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-10 16:47:36 (UTC) |
commit | 157120031b77a3d9f10d780a66b6441dac1399fa (patch) (unidiff) | |
tree | fe756e71b5290940d2824d06c11e5f887a6f00e2 /kmicromail/libmailwrapper | |
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() | |||
98 | { | 98 | { |
99 | const char *server, *user, *pass; | 99 | QString server, user, pass; |
100 | uint16_t port; | 100 | uint16_t port; |
@@ -114,3 +114,3 @@ void IMAPwrapper::login() | |||
114 | } | 114 | } |
115 | server = account->getServer().latin1(); | 115 | server = account->getServer(); |
116 | port = account->getPort().toUInt(); | 116 | port = account->getPort().toUInt(); |
@@ -121,4 +121,4 @@ void IMAPwrapper::login() | |||
121 | // ok | 121 | // ok |
122 | user = login.getUser().latin1(); | 122 | user = login.getUser(); |
123 | pass = login.getPassword().latin1(); | 123 | pass = login.getPassword(); |
124 | } else { | 124 | } else { |
@@ -128,4 +128,4 @@ void IMAPwrapper::login() | |||
128 | } else { | 128 | } else { |
129 | user = account->getUser().latin1(); | 129 | user = account->getUser(); |
130 | pass = account->getPassword().latin1(); | 130 | pass = account->getPassword(); |
131 | } | 131 | } |
@@ -148,5 +148,5 @@ void IMAPwrapper::login() | |||
148 | qDebug("using ssl "); | 148 | qDebug("using ssl "); |
149 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); | 149 | err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); |
150 | } else { | 150 | } else { |
151 | err = mailimap_socket_connect( m_imap, (char*)server, port ); | 151 | err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port ); |
152 | } | 152 | } |
@@ -182,3 +182,3 @@ void IMAPwrapper::login() | |||
182 | if (ok) { | 182 | if (ok) { |
183 | err = mailimap_login_simple( m_imap, (char*)user, (char*)pass ); | 183 | err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() ); |
184 | if ( err != MAILIMAP_NO_ERROR ) { | 184 | 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() | |||
119 | 119 | ||
120 | const char *server, *user, *pass; | 120 | QString server; |
121 | QString User,Pass; | 121 | QString User,Pass; |
@@ -124,7 +124,5 @@ void NNTPwrapper::login() | |||
124 | 124 | ||
125 | server = account->getServer().latin1(); | 125 | server = account->getServer(); |
126 | port = account->getPort().toUInt(); | 126 | port = account->getPort().toUInt(); |
127 | 127 | ||
128 | user = pass = 0; | ||
129 | |||
130 | if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) { | 128 | if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) { |
@@ -134,4 +132,4 @@ void NNTPwrapper::login() | |||
134 | // ok | 132 | // ok |
135 | User = login.getUser().latin1(); | 133 | User = login.getUser(); |
136 | Pass = login.getPassword().latin1(); | 134 | Pass = login.getPassword(); |
137 | } else { | 135 | } else { |
@@ -142,13 +140,6 @@ void NNTPwrapper::login() | |||
142 | } else { | 140 | } else { |
143 | User = account->getUser().latin1(); | 141 | User = account->getUser(); |
144 | Pass = account->getPassword().latin1(); | 142 | Pass = account->getPassword(); |
145 | } | 143 | } |
146 | 144 | ||
147 | if (User.isEmpty()) { | ||
148 | user=0; | ||
149 | pass = 0; | ||
150 | } else { | ||
151 | user=User.latin1(); | ||
152 | pass=Pass.latin1(); | ||
153 | } | ||
154 | // bool ssl = account->getSSL(); | 145 | // bool ssl = account->getSSL(); |
@@ -169,4 +160,4 @@ void NNTPwrapper::login() | |||
169 | 160 | ||
170 | nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN, | 161 | nntp_mailstorage_init(m_nntp,(char*)server.latin1(), port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN, |
171 | (char*)user,(char*)pass,0,0,0); | 162 | (char*)User.latin1(),(char*)Pass.latin1(),0,0,0); |
172 | 163 | ||
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() | |||
120 | 120 | ||
121 | const char *server, *user, *pass; | 121 | QString server,user, pass; |
122 | uint16_t port; | 122 | uint16_t port; |
@@ -132,4 +132,5 @@ void POP3wrapper::login() | |||
132 | // ok | 132 | // ok |
133 | user = login.getUser().latin1(); | 133 | qDebug("ok "); |
134 | pass = login.getPassword().latin1(); | 134 | user = login.getUser(); |
135 | pass = login.getPassword(); | ||
135 | } else { | 136 | } else { |
@@ -140,6 +141,5 @@ void POP3wrapper::login() | |||
140 | } else { | 141 | } else { |
141 | user = account->getUser().latin1(); | 142 | user = account->getUser(); |
142 | pass = account->getPassword().latin1(); | 143 | pass = account->getPassword(); |
143 | } | 144 | } |
144 | |||
145 | // bool ssl = account->getSSL(); | 145 | // bool ssl = account->getSSL(); |
@@ -147,3 +147,2 @@ void POP3wrapper::login() | |||
147 | m_pop3=mailstorage_new(NULL); | 147 | m_pop3=mailstorage_new(NULL); |
148 | |||
149 | int conntypeset = account->ConnectionType(); | 148 | int conntypeset = account->ConnectionType(); |
@@ -162,5 +161,4 @@ void POP3wrapper::login() | |||
162 | 161 | ||
163 | pop3_mailstorage_init(m_pop3,(char*)server, port, NULL, conntype, POP3_AUTH_TYPE_PLAIN, | 162 | pop3_mailstorage_init(m_pop3,(char*)server.latin1(), port, NULL, conntype, POP3_AUTH_TYPE_PLAIN, |
164 | (char*)user,(char*)pass,0,0,0); | 163 | (char*)user.latin1(),(char*)pass.latin1(),0,0,0); |
165 | |||
166 | 164 | ||
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() | |||
184 | { | 184 | { |
185 | const char *server, *user, *pass; | 185 | QString server, user, pass; |
186 | bool ssl; | 186 | bool ssl; |
@@ -190,3 +190,2 @@ void SMTPwrapper::connect_server() | |||
190 | bool force_tls=false; | 190 | bool force_tls=false; |
191 | server = user = pass = 0; | ||
192 | QString failuretext = ""; | 191 | QString failuretext = ""; |
@@ -196,3 +195,3 @@ void SMTPwrapper::connect_server() | |||
196 | } | 195 | } |
197 | server = m_SmtpAccount->getServer().latin1(); | 196 | server = m_SmtpAccount->getServer(); |
198 | if ( m_SmtpAccount->ConnectionType() == 2 ) { | 197 | if ( m_SmtpAccount->ConnectionType() == 2 ) { |
@@ -217,6 +216,6 @@ void SMTPwrapper::connect_server() | |||
217 | ; // odebug << "SSL session" << oendl; | 216 | ; // odebug << "SSL session" << oendl; |
218 | err = mailsmtp_ssl_connect( m_smtp, server, port ); | 217 | err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); |
219 | } else { | 218 | } else { |
220 | ; // odebug << "No SSL session" << oendl; | 219 | ; // odebug << "No SSL session" << oendl; |
221 | err = mailsmtp_socket_connect( m_smtp, server, port ); | 220 | err = mailsmtp_socket_connect( m_smtp, server.latin1(), port ); |
222 | } | 221 | } |
@@ -260,4 +259,4 @@ void SMTPwrapper::connect_server() | |||
260 | // ok | 259 | // ok |
261 | user = login.getUser().latin1(); | 260 | user = login.getUser(); |
262 | pass = login.getPassword().latin1(); | 261 | pass = login.getPassword(); |
263 | } else { | 262 | } else { |
@@ -267,4 +266,4 @@ void SMTPwrapper::connect_server() | |||
267 | } else { | 266 | } else { |
268 | user = m_SmtpAccount->getUser().latin1(); | 267 | user = m_SmtpAccount->getUser(); |
269 | pass = m_SmtpAccount->getPassword().latin1(); | 268 | pass = m_SmtpAccount->getPassword(); |
270 | } | 269 | } |
@@ -272,3 +271,3 @@ void SMTPwrapper::connect_server() | |||
272 | if (result) { | 271 | if (result) { |
273 | err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); | 272 | err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() ); |
274 | if ( err == MAILSMTP_NO_ERROR ) { | 273 | if ( err == MAILSMTP_NO_ERROR ) { |