Ejemplo n.º 1
0
void AbstractSshChannel::handleOpenFailure(const QString &reason)
{
    if (m_state != SessionRequested) {
       throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
           "Invalid SSH_MSG_CHANNEL_OPEN_FAILURE packet.");
   }
    m_timeoutTimer->stop();

#ifdef CREATOR_SSH_DEBUG
   qDebug("Channel open request failed for channel %u", m_localChannel);
#endif
   handleOpenFailureInternal(reason);
}
Ejemplo n.º 2
0
void AbstractSshChannel::handleOpenFailure(const QString &reason)
{
    switch (m_state) {
    case SessionRequested:
        break; // Ok, continue.
    case CloseRequested:
        return; // Late server reply; we requested a channel close in the meantime.
    default:
        throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
            "Unexpected SSH_MSG_CHANNEL_OPEN_FAILURE packet.");
    }

    m_timeoutTimer.stop();

   qCDebug(sshLog, "Channel open request failed for channel %u", m_localChannel);
   handleOpenFailureInternal(reason);
}