コード例 #1
0
ファイル: sshchannel.cpp プロジェクト: choenig/qt-creator
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);
}
コード例 #2
0
ファイル: sftpchannel.cpp プロジェクト: Au-Zone/QSsh
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;
}
コード例 #3
0
ファイル: sftpchannel.cpp プロジェクト: Au-Zone/QSsh
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();
}
コード例 #4
0
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();
    }
}
コード例 #5
0
ファイル: sftpchannel.cpp プロジェクト: Au-Zone/QSsh
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);
    }
}
コード例 #6
0
void AbstractSshChannel::checkChannelActive()
{
    if (channelState() == Inactive || channelState() == Closed)
        throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
            "Channel not open.");
}
コード例 #7
0
ファイル: simpledrumsgui.cpp プロジェクト: AndreeeCZ/muse
/*!
    \fn QChannelButton::isClicked()
 */
void QChannelButton::isClicked()
{
   emit channelState(channel, this->isChecked());
}
コード例 #8
0
ファイル: simpledrumsgui.cpp プロジェクト: AndreeeCZ/muse
/*!
    \fn QChannelCheckbox::isClicked()
 */
void QChannelCheckbox::isClicked()
{
   emit channelState(channel, this->isChecked());
}