SSH: Don't allow connectToHost() while already connecting/connected.

Also fix callers potentially violating this policy.

Change-Id: I630f1c544885df93a81e217e792363c0c2314108
Reviewed-on: http://codereview.qt.nokia.com/1186
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Christian Kandeler
2011-07-05 18:01:58 +02:00
parent 7ecf1e75d4
commit ee635dcf9e
6 changed files with 12 additions and 5 deletions

View File

@@ -620,6 +620,8 @@ void SshConnectionPrivate::sendKeepAlivePacket()
void SshConnectionPrivate::connectToHost()
{
QTC_ASSERT(m_state == SocketUnconnected, return);
m_incomingData.clear();
m_incomingPacket.reset();
m_sendFacility.reset();