Bugzilla – Attachment 2297 Details for
Bug 1917
Escape sequence (~) doesn't work right with ControlMaster/ControlPersist connections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
allow ~. to abandon mux master channels
ssh-mux-abandon.patch (text/plain), 2.82 KB, created by
Darren Tucker
on 2013-06-07 02:41:54 AEST
(
hide
)
Description:
allow ~. to abandon mux master channels
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2013-06-07 02:41:54 AEST
Size:
2.82 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.c,v >retrieving revision 1.322 >diff -u -p -r1.322 channels.c >--- channels.c 1 Jun 2013 13:15:51 -0000 1.322 >+++ channels.c 3 Jun 2013 18:25:00 -0000 >@@ -209,6 +209,7 @@ channel_lookup(int id) > case SSH_CHANNEL_OPEN: > case SSH_CHANNEL_INPUT_DRAINING: > case SSH_CHANNEL_OUTPUT_DRAINING: >+ case SSH_CHANNEL_ABANDONED: > return (c); > } > logit("Non-public channel %d, type %d.", id, c->type); >@@ -525,6 +526,7 @@ channel_still_open(void) > case SSH_CHANNEL_DYNAMIC: > case SSH_CHANNEL_CONNECTING: > case SSH_CHANNEL_ZOMBIE: >+ case SSH_CHANNEL_ABANDONED: > continue; > case SSH_CHANNEL_LARVAL: > if (!compat20) >@@ -570,6 +572,7 @@ channel_find_open(void) > case SSH_CHANNEL_OPENING: > case SSH_CHANNEL_CONNECTING: > case SSH_CHANNEL_ZOMBIE: >+ case SSH_CHANNEL_ABANDONED: > continue; > case SSH_CHANNEL_LARVAL: > case SSH_CHANNEL_AUTH_SOCKET: >@@ -617,6 +620,7 @@ channel_open_message(void) > case SSH_CHANNEL_CLOSED: > case SSH_CHANNEL_AUTH_SOCKET: > case SSH_CHANNEL_ZOMBIE: >+ case SSH_CHANNEL_ABANDONED: > case SSH_CHANNEL_MUX_CLIENT: > case SSH_CHANNEL_MUX_LISTENER: > continue; >@@ -2469,7 +2473,7 @@ channel_input_close_confirmation(int typ > if (c == NULL) > packet_disconnect("Received close confirmation for " > "out-of-range channel %d.", id); >- if (c->type != SSH_CHANNEL_CLOSED) >+ if (c->type != SSH_CHANNEL_CLOSED && c->type != SSH_CHANNEL_ABANDONED) > packet_disconnect("Received close confirmation for " > "non-closed channel %d (type %d).", id, c->type); > channel_free(c); >Index: channels.h >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.h,v >retrieving revision 1.112 >diff -u -p -r1.112 channels.h >--- channels.h 2 Jun 2013 21:01:51 -0000 1.112 >+++ channels.h 3 Jun 2013 18:25:00 -0000 >@@ -55,7 +55,8 @@ > #define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */ > #define SSH_CHANNEL_MUX_LISTENER 15 /* Listener for mux conn. */ > #define SSH_CHANNEL_MUX_CLIENT 16 /* Conn. to mux slave */ >-#define SSH_CHANNEL_MAX_TYPE 17 >+#define SSH_CHANNEL_ABANDONED 17 /* Abandoned session, eg mux */ >+#define SSH_CHANNEL_MAX_TYPE 18 > > #define CHANNEL_CANCEL_PORT_STATIC -1 > >Index: clientloop.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v >retrieving revision 1.252 >diff -u -p -r1.252 clientloop.c >--- clientloop.c 2 Jun 2013 23:36:29 -0000 1.252 >+++ clientloop.c 3 Jun 2013 18:25:00 -0000 >@@ -1102,6 +1102,9 @@ process_escapes(Channel *c, Buffer *bin, > chan_write_failed(c); > if (c->detach_user) > c->detach_user(c->self, NULL); >+ c->type = SSH_CHANNEL_ABANDONED; >+ buffer_clear(&c->input); >+ chan_ibuf_empty(c); > return 0; > } else > quit_pending = 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1917
: 2297 |
2298