Disconnect connection if login failed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40976 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -198,14 +198,17 @@ IMAPProtocol::Connect(const char* server, const char* username,
|
|||||||
|
|
||||||
TRACE("Login\n");
|
TRACE("Login\n");
|
||||||
|
|
||||||
|
fIsConnected = true;
|
||||||
|
|
||||||
BString command = "LOGIN ";
|
BString command = "LOGIN ";
|
||||||
command << "\"" << username << "\" ";
|
command << "\"" << username << "\" ";
|
||||||
command << "\"" << password << "\"";
|
command << "\"" << password << "\"";
|
||||||
status = ProcessCommand(command);
|
status = ProcessCommand(command);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
_Disconnect();
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
fIsConnected = true;
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user