void AbstractSshChannel::handleChannelClose() { qCDebug(sshLog, "Receiving CLOSE for channel %u", m_localChannel); if (channelState() == Inactive || channelState() == Closed) { throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR, "Unexpected SSH_MSG_CHANNEL_CLOSE message."); } closeChannel(); setChannelState(Closed); }
void SftpChannelPrivate::handleChannelSuccess() { if (channelState() == CloseRequested) return; #ifdef CREATOR_SSH_DEBUG qDebug("sftp subsystem initialized"); #endif sendData(m_outgoingPacket.generateInit(ProtocolVersion).rawData()); m_sftpState = InitSent; }
void SftpChannelPrivate::handleChannelFailure() { if (channelState() == CloseRequested) return; if (m_sftpState != SubsystemRequested) { throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR, "Unexpected SSH_MSG_CHANNEL_FAILURE packet."); } emit initializationFailed(tr("Server could not start SFTP subsystem.")); closeChannel(); }
void SshForwardedTcpIpTunnelPrivate::handleOpenSuccessInternal() { QSSH_ASSERT_AND_RETURN(channelState() == AbstractSshChannel::SessionEstablished); try { m_sendFacility.sendChannelOpenConfirmationPacket(remoteChannel(), localChannelId(), initialWindowSize(), maxPacketSize()); } catch (const std::exception &e) { // Won't happen, but let's play it safe. qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } }
void SftpChannelPrivate::handleChannelDataInternal(const QByteArray &data) { if (channelState() == CloseRequested) return; m_incomingData += data; m_incomingPacket.consumeData(m_incomingData); while (m_incomingPacket.isComplete()) { handleCurrentPacket(); m_incomingPacket.clear(); m_incomingPacket.consumeData(m_incomingData); } }
void AbstractSshChannel::checkChannelActive() { if (channelState() == Inactive || channelState() == Closed) throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR, "Channel not open."); }
/*! \fn QChannelButton::isClicked() */ void QChannelButton::isClicked() { emit channelState(channel, this->isChecked()); }
/*! \fn QChannelCheckbox::isClicked() */ void QChannelCheckbox::isClicked() { emit channelState(channel, this->isChecked()); }