aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async
diff options
context:
space:
mode:
Diffstat (limited to 'src/async')
-rwxr-xr-xsrc/async/imap/MCIMAPAsyncConnection.cpp7
-rw-r--r--src/async/nntp/MCNNTPFetchOverviewOperation.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/async/imap/MCIMAPAsyncConnection.cpp b/src/async/imap/MCIMAPAsyncConnection.cpp
index b2fc24c3..c03422ff 100755
--- a/src/async/imap/MCIMAPAsyncConnection.cpp
+++ b/src/async/imap/MCIMAPAsyncConnection.cpp
@@ -239,8 +239,11 @@ IMAPNamespace * IMAPAsyncConnection::defaultNamespace()
void IMAPAsyncConnection::setClientIdentity(IMAPIdentity * identity)
{
MC_SAFE_REPLACE_COPY(IMAPIdentity, mClientIdentity, identity);
- mc_foreacharray(String, key, identity->allInfoKeys()) {
- mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key));
+ mSession->clientIdentity()->removeAllInfos();
+ if (identity != NULL) {
+ mc_foreacharray(String, key, identity->allInfoKeys()) {
+ mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key));
+ }
}
}
diff --git a/src/async/nntp/MCNNTPFetchOverviewOperation.cpp b/src/async/nntp/MCNNTPFetchOverviewOperation.cpp
index b05b29e6..749ea222 100644
--- a/src/async/nntp/MCNNTPFetchOverviewOperation.cpp
+++ b/src/async/nntp/MCNNTPFetchOverviewOperation.cpp
@@ -52,7 +52,7 @@ Array * NNTPFetchOverviewOperation::articles() {
void NNTPFetchOverviewOperation::main()
{
- ErrorCode error;
+ ErrorCode error = ErrorNone;
mArticles = Array::array();
for(unsigned int i = 0 ; i < mIndexes->rangesCount() ; i ++) {
Range range = mIndexes->allRanges()[i];