You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Glenn McGregor (JIRA)" <ji...@apache.org> on 2013/07/26 02:35:48 UTC
[jira] [Created] (SSHD-245) Support Break Extension (RFC 4335)
Glenn McGregor created SSHD-245:
-----------------------------------
Summary: Support Break Extension (RFC 4335)
Key: SSHD-245
URL: https://issues.apache.org/jira/browse/SSHD-245
Project: MINA SSHD
Issue Type: New Feature
Reporter: Glenn McGregor
Priority: Minor
I can't find a way to force a unix ssh client to send an interrupt signal, but it seems easy to force the break.
Unfortunately, the break message isn't implemented.
It was easy to patch in my needs...
In ChannelSession:
protected boolean handleRequest(String type, Buffer buffer) throws IOException {
if ("env".equals(type)) {
return handleEnv(buffer);
}
if ("pty-req".equals(type)) {
return handlePtyReq(buffer);
}
if ("window-change".equals(type)) {
return handleWindowChange(buffer);
}
if ("signal".equals(type)) {
return handleSignal(buffer);
}
if ("break".equals(type)) {
return handleBreak(buffer);
}
....
protected boolean handleBreak(Buffer buffer) throws IOException {
boolean wantReply = buffer.getBoolean();
int length = buffer.getInt();
log.debug("Break received on channel {}: {}", id, length);
getEnvironment().signal( Signal.INT );
if (wantReply) {
buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_SUCCESS, 0);
buffer.putInt(recipient);
session.writePacket(buffer);
}
return true;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira