author | alwin <alwin> | 2004-03-05 13:15:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-05 13:15:15 (UTC) |
commit | 4a18103940564be8585af8121203561e16f0a32c (patch) (side-by-side diff) | |
tree | a3abb3b7b80674ddb956847e2ae7e1b42fa78301 /noncore/net/mail/libmailwrapper | |
parent | 5af6bb27d2ba6a1d00fd0a6df0550d02164f87e6 (diff) | |
download | opie-4a18103940564be8585af8121203561e16f0a32c.zip opie-4a18103940564be8585af8121203561e16f0a32c.tar.gz opie-4a18103940564be8585af8121203561e16f0a32c.tar.bz2 |
could hold pointer to destructed content
connection problem fixed as quick hack, must done better or real.
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index c68964d..54e0ed4 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp @@ -119,2 +119,3 @@ void NNTPwrapper::login() const char *server, *user, *pass; + QString User,Pass; uint16_t port; @@ -125,2 +126,4 @@ void NNTPwrapper::login() + user = pass = 0; + if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { @@ -130,4 +133,4 @@ void NNTPwrapper::login() // ok - user = login.getUser().latin1(); - pass = login.getPassword().latin1(); + User = login.getUser().latin1(); + Pass = login.getPassword().latin1(); } else { @@ -138,6 +141,13 @@ void NNTPwrapper::login() } else { - user = account->getUser().latin1(); - pass = account->getPassword().latin1(); + User = account->getUser().latin1(); + Pass = account->getPassword().latin1(); } + if (User.isEmpty()) { + user=0; + pass = 0; + } else { + user=User.latin1(); + pass=Pass.latin1(); + } // bool ssl = account->getSSL(); @@ -158,3 +168,3 @@ void NNTPwrapper::login() - nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, conntype, NNTP_AUTH_TYPE_PLAIN, + nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN, (char*)user,(char*)pass,0,0,0); |