Bugzilla – Attachment 2298 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, diff vs 6.2p2
openssh-6.2p2-mux-abandon.patch (text/plain), 2.85 KB, created by
Darren Tucker
on 2013-06-07 02:50:31 AEST
(
hide
)
Description:
allow ~. to abandon mux master channels, diff vs 6.2p2
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2013-06-07 02:50:31 AEST
Size:
2.85 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /home/dtucker/openssh/cvs/openssh/channels.c,v >retrieving revision 1.310 >diff -u -p -r1.310 channels.c >--- channels.c 2 Dec 2012 22:50:55 -0000 1.310 >+++ channels.c 6 Jun 2013 16:47:14 -0000 >@@ -213,6 +213,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); >@@ -536,6 +537,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) >@@ -581,6 +583,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: >@@ -628,6 +631,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; >@@ -2495,7 +2499,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: /home/dtucker/openssh/cvs/openssh/channels.h,v >retrieving revision 1.104 >diff -u -p -r1.104 channels.h >--- channels.h 22 Apr 2012 01:21:10 -0000 1.104 >+++ channels.h 6 Jun 2013 16:47:14 -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: /home/dtucker/openssh/cvs/openssh/clientloop.c,v >retrieving revision 1.237 >diff -u -p -r1.237 clientloop.c >--- clientloop.c 9 Jan 2013 04:55:51 -0000 1.237 >+++ clientloop.c 6 Jun 2013 16:47:51 -0000 >@@ -1105,6 +1105,9 @@ process_escapes(Channel *c, Buffer *bin, > chan_write_failed(c); > mux_master_session_cleanup_cb(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
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1917
:
2297
| 2298