You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2013/07/26 12:49:50 UTC
[jira] [Updated] (SSHD-245) Support Break Extension (RFC 4335)
[ https://issues.apache.org/jira/browse/SSHD-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated SSHD-245:
---------------------------------
Fix Version/s: (was: 0.10.0)
0.9.0
> 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
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 0.9.0
>
>
> 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