Commit 7d93576b authored by Niels Möller's avatar Niels Möller
Browse files

(make_channel_io_exception_handler): New argument

silent.

Rev: src/channel.c:1.112
Rev: src/channel.h:1.72
parent 6cbefe53
...@@ -2001,7 +2001,8 @@ make_channel_read_close_callback(struct ssh_channel *channel) ...@@ -2001,7 +2001,8 @@ make_channel_read_close_callback(struct ssh_channel *channel)
(super exception_handler) (super exception_handler)
(vars (vars
(channel object ssh_channel) (channel object ssh_channel)
(prefix . "const char *"))) (prefix . "const char *")
(silent . int)))
*/ */
static void static void
...@@ -2011,7 +2012,8 @@ do_channel_io_exception_handler(struct exception_handler *s, ...@@ -2011,7 +2012,8 @@ do_channel_io_exception_handler(struct exception_handler *s,
CAST(channel_io_exception_handler, self, s); CAST(channel_io_exception_handler, self, s);
if (x->type & EXC_IO) if (x->type & EXC_IO)
{ {
werror("channel.c: I/O error on write, %z\n", x->msg); if (!self->silent)
werror("channel.c: %zI/O error, %z\n", self->prefix, x->msg);
#if 0 #if 0
send_debug_message(self->channel->write, send_debug_message(self->channel->write,
ssh_format("%z I/O error: %z\n", ssh_format("%z I/O error: %z\n",
...@@ -2027,6 +2029,7 @@ do_channel_io_exception_handler(struct exception_handler *s, ...@@ -2027,6 +2029,7 @@ do_channel_io_exception_handler(struct exception_handler *s,
struct exception_handler * struct exception_handler *
make_channel_io_exception_handler(struct ssh_channel *channel, make_channel_io_exception_handler(struct ssh_channel *channel,
const char *prefix, const char *prefix,
int silent,
struct exception_handler *parent, struct exception_handler *parent,
const char *context) const char *context)
{ {
...@@ -2037,7 +2040,7 @@ make_channel_io_exception_handler(struct ssh_channel *channel, ...@@ -2037,7 +2040,7 @@ make_channel_io_exception_handler(struct ssh_channel *channel,
self->channel = channel; self->channel = channel;
self->prefix = prefix; self->prefix = prefix;
self->silent = silent;
return &self->super; return &self->super;
} }
......
...@@ -423,6 +423,7 @@ make_channel_read_close_callback(struct ssh_channel *channel); ...@@ -423,6 +423,7 @@ make_channel_read_close_callback(struct ssh_channel *channel);
struct exception_handler * struct exception_handler *
make_channel_io_exception_handler(struct ssh_channel *channel, make_channel_io_exception_handler(struct ssh_channel *channel,
const char *prefix, const char *prefix,
int silent,
struct exception_handler *parent, struct exception_handler *parent,
const char *context); const char *context);
......
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