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:
parent
3f9320c6a2
commit
86be65dc7a
@ -198,14 +198,17 @@ IMAPProtocol::Connect(const char* server, const char* username,
|
||||
|
||||
TRACE("Login\n");
|
||||
|
||||
fIsConnected = true;
|
||||
|
||||
BString command = "LOGIN ";
|
||||
command << "\"" << username << "\" ";
|
||||
command << "\"" << password << "\"";
|
||||
status = ProcessCommand(command);
|
||||
if (status != B_OK)
|
||||
if (status != B_OK) {
|
||||
_Disconnect();
|
||||
return status;
|
||||
}
|
||||
|
||||
fIsConnected = true;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user