From ed817c0b2f0648d2f32887de1e4e6deb7513a953 Mon Sep 17 00:00:00 2001 From: Christopher Hockley Date: Fri, 20 Feb 2015 09:23:33 +0100 Subject: AccountValidator Fixes --- src/core/provider/MCAccountValidator.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/core/provider/MCAccountValidator.cpp b/src/core/provider/MCAccountValidator.cpp index 235c1704..8a290228 100644 --- a/src/core/provider/MCAccountValidator.cpp +++ b/src/core/provider/MCAccountValidator.cpp @@ -228,6 +228,7 @@ void AccountValidator::checkNextHost() mImapSession->setConnectionType(mImapServer->connectionType()); mOperation = (IMAPOperation *)mImapSession->checkAccountOperation(); + mOperation->retain(); mOperation->setCallback(this); mOperation->start(); } @@ -249,6 +250,7 @@ void AccountValidator::checkNextHost() mPopSession->setConnectionType(mPopServer->connectionType()); mOperation = mPopSession->checkAccountOperation(); + mOperation->retain(); mOperation->setCallback(this); mOperation->start(); } @@ -270,6 +272,7 @@ void AccountValidator::checkNextHost() mSmtpSession->setConnectionType(mSmtpServer->connectionType()); mOperation = mSmtpSession->checkAccountOperation(Address::addressWithMailbox(mEmail)); + mOperation->retain(); mOperation->setCallback(this); mOperation->start(); } @@ -304,6 +307,8 @@ void AccountValidator::checkNextHostDone() MC_SAFE_RELEASE(mSmtpSession); } + MC_SAFE_RELEASE(mOperation); + if (error == ErrorNone) { mCurrentServiceTested ++; } -- cgit v1.2.3