SSH: Check for more timeouts.

This commit is contained in:
Christian Kandeler
2010-08-17 09:22:43 +02:00
parent 3a4baff506
commit 2c5e3f1f69
3 changed files with 25 additions and 5 deletions

View File

@@ -36,6 +36,8 @@
#include <botan/exceptn.h>
#include <QtCore/QTimer>
namespace Core {
const QByteArray SshRemoteProcess::AbrtSignal("ABRT");
@@ -158,6 +160,7 @@ void SshRemoteProcessPrivate::handleOpenSuccessInternal()
m_sendFacility.sendExecPacket(remoteChannel(), m_command);
setProcState(ExecRequested);
m_timeoutTimer->start(ReplyTimeout);
}
void SshRemoteProcessPrivate::handleOpenFailureInternal()
@@ -171,6 +174,7 @@ void SshRemoteProcessPrivate::handleChannelSuccess()
throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
"Unexpected SSH_MSG_CHANNEL_SUCCESS message.");
}
m_timeoutTimer->stop();
setProcState(Running);
}
@@ -180,7 +184,7 @@ void SshRemoteProcessPrivate::handleChannelFailure()
throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
"Unexpected SSH_MSG_CHANNEL_FAILURE message.");
}
m_timeoutTimer->stop();
setProcState(StartFailed);
closeChannel();
}