forked from qt-creator/qt-creator
SSH: Implement pseudo terminal support.
Untested yet, because SSH tests are currently broken. (They are fixed in 2.2 and will be merged back soon.)
This commit is contained in:
@@ -154,6 +154,23 @@ void SshOutgoingPacket::generateEnvPacket(quint32 remoteChannel,
|
||||
.appendBool(false).appendString(var).appendString(value).finalize();
|
||||
}
|
||||
|
||||
void SshOutgoingPacket::generatePtyRequestPacket(quint32 remoteChannel,
|
||||
const SshPseudoTerminal &terminal)
|
||||
{
|
||||
init(SSH_MSG_CHANNEL_REQUEST).appendInt(remoteChannel)
|
||||
.appendString("pty-req").appendBool(false)
|
||||
.appendString(terminal.termType).appendInt(terminal.columnCount)
|
||||
.appendInt(terminal.rowCount);
|
||||
QByteArray modeString;
|
||||
for (SshPseudoTerminal::ModeMap::ConstIterator it = terminal.modes.constBegin();
|
||||
it != terminal.modes.constEnd(); ++it) {
|
||||
modeString += encodeInt(static_cast<quint8>(it.key()));
|
||||
modeString += encodeInt(it.value());
|
||||
}
|
||||
modeString += encodeInt(static_cast<quint8>(0)); // TTY_OP_END
|
||||
appendString(modeString).finalize();
|
||||
}
|
||||
|
||||
void SshOutgoingPacket::generateExecPacket(quint32 remoteChannel,
|
||||
const QByteArray &command)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user