Commit 3feef8d3 authored by Niels Möller's avatar Niels Möller

* server.c (do_eof): Consider closing (if CHANNEL_SENT_EOF and

CHANNEL_CLOSE_AT_EOF are both set).

Rev: src/server.c:1.33
parent 0ed3917a
...@@ -382,13 +382,17 @@ static int do_send(struct ssh_channel *c) ...@@ -382,13 +382,17 @@ static int do_send(struct ssh_channel *c)
return LSH_OK | LSH_GOON; return LSH_OK | LSH_GOON;
} }
static int do_eof(struct ssh_channel *c) static int do_eof(struct ssh_channel *channel)
{ {
CAST(server_session, session, c); CAST(server_session, session, channel);
write_buffer_close(session->in->buffer); write_buffer_close(session->in->buffer);
return LSH_OK | LSH_GOON; if ( (channel->flags & CHANNEL_SENT_EOF)
&& (channel->flags & CHANNEL_CLOSE_AT_EOF))
return channel_close(channel);
return LSH_OK | LSH_GOON;
} }
static void do_close(struct ssh_channel *c) static void do_close(struct ssh_channel *c)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment