Bugzilla – Attachment 52 Details for
Bug 179
sshd sends channel data after sending EOF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
possible fix
CH (text/plain), 2.90 KB, created by
Markus Friedl
on 2002-03-23 05:46:05 AEDT
(
hide
)
Description:
possible fix
Filename:
MIME Type:
Creator:
Markus Friedl
Created:
2002-03-23 05:46:05 AEDT
Size:
2.90 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /home/markus/cvs/ssh/channels.c,v >retrieving revision 1.171 >diff -u -r1.171 channels.c >--- channels.c 4 Mar 2002 19:37:58 -0000 1.171 >+++ channels.c 22 Mar 2002 18:04:11 -0000 >@@ -1562,6 +1562,10 @@ > channel_handler(channel_post, readset, writeset); > } > >+#define CHANNEL_EFD_ALIVE(c) \ >+ (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ >+ (c->efd != -1 || buffer_len(&c->extended) > 0)) >+ > > /* If there is data to send to the connection, enqueue some of it now. */ > >@@ -1634,7 +1638,11 @@ > * input-buffer is empty and read-socket shutdown: > * tell peer, that we will not send more data: send IEOF > */ >- chan_ibuf_empty(c); >+ if (CHANNEL_EFD_ALIVE(c)) >+ debug2("channel %d: ibuf_empty delayed efd %d/(%d)", >+ c->self, c->efd, buffer_len(&c->extended)); >+ else >+ chan_ibuf_empty(c); > } > /* Send extended data, i.e. stderr */ > if (compat20 && >@@ -1726,6 +1734,8 @@ > log("channel %d: ext data for non open", id); > return; > } >+ if (c->ostate == CHAN_OUTPUT_CLOSED) >+ debug2("channel %d: ext data for OUTPUT_CLOSED [error]", id); > tcode = packet_get_int(); > if (c->efd == -1 || > c->extended_usage != CHAN_EXTENDED_WRITE || >Index: nchan.c >=================================================================== >RCS file: /home/markus/cvs/ssh/nchan.c,v >retrieving revision 1.44 >diff -u -r1.44 nchan.c >--- nchan.c 21 Jan 2002 23:27:10 -0000 1.44 >+++ nchan.c 22 Mar 2002 17:46:28 -0000 >@@ -404,39 +404,22 @@ > debug("channel %d: is dead", c->self); > return 1; > } >- /* >- * we have to delay the close message if the efd (for stderr) is >- * still active >- */ >- if (((c->extended_usage != CHAN_EXTENDED_IGNORE) && >- buffer_len(&c->extended) > 0) >-#if 0 >- || ((c->extended_usage == CHAN_EXTENDED_READ) && >- c->efd != -1) >-#endif >- ) { >- debug2("channel %d: active efd: %d len %d type %s", >- c->self, c->efd, buffer_len(&c->extended), >- c->extended_usage==CHAN_EXTENDED_READ ? >- "read": "write"); >- } else { >- if (!(c->flags & CHAN_CLOSE_SENT)) { >- if (send) { >- chan_send_close2(c); >- } else { >- /* channel would be dead if we sent a close */ >- if (c->flags & CHAN_CLOSE_RCVD) { >- debug("channel %d: almost dead", >- c->self); >- return 1; >- } >+ if (!(c->flags & CHAN_CLOSE_SENT)) { >+ if (send) { >+ chan_send_close2(c); >+ } else { >+ /* channel would be dead if we sent a close */ >+ if (c->flags & CHAN_CLOSE_RCVD) { >+ debug("channel %d: almost dead", >+ c->self); >+ return 1; > } > } >- if ((c->flags & CHAN_CLOSE_SENT) && >- (c->flags & CHAN_CLOSE_RCVD)) { >- debug("channel %d: is dead", c->self); >- return 1; >- } >+ } >+ if ((c->flags & CHAN_CLOSE_SENT) && >+ (c->flags & CHAN_CLOSE_RCVD)) { >+ debug("channel %d: is dead", c->self); >+ return 1; > } > return 0; > }
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 179
: 52 |
53