Commit 7069c495 authored by Niels Möller's avatar Niels Möller
Browse files

* src/debug.c (send_debug_message): New function, to

unconditionally send a DEBUG message.
(send_debug, send_verbose): Change argument type from struct
ssh_connection to struct abstract_write.

Rev: src/debug.c:1.31
Rev: src/debug.h:1.12
parent 669e54b9
......@@ -88,16 +88,21 @@ static struct lsh_string *make_debug_packet(const char *msg, int always_display)
}
/* Send a debug message to the other end. */
void send_debug(struct ssh_connection *connection, const char *msg, int always_display)
void send_debug_message(struct abstract_write *write, const char *msg, int always_display)
{
A_WRITE(write, make_debug_packet(msg, always_display));
}
void send_debug(struct abstract_write *write, const char *msg, int always_display)
{
if (debug_flag)
C_WRITE(connection, make_debug_packet(msg, always_display));
send_debug_message(write, msg, always_display);
}
void send_verbose(struct ssh_connection *connection, const char *msg, int always_display)
void send_verbose(struct abstract_write *write, const char *msg, int always_display)
{
if (verbose_flag)
C_WRITE(connection, make_debug_packet(msg, always_display));
send_debug_message(write, msg, always_display);
}
static void
......
......@@ -33,9 +33,9 @@
struct abstract_write *
make_packet_debug(struct abstract_write *continuation, const char *prefix);
void send_debug(struct ssh_connection *connection, const char *msg, int always_display);
void send_verbose(struct ssh_connection *connection, const char *msg, int always_display);
void send_debug_message(struct abstract_write *write, const char *msg, int always_display);
void send_debug(struct abstract_write *write, const char *msg, int always_display);
void send_verbose(struct abstract_write *write, const char *msg, int always_display);
struct packet_handler *make_rec_debug_handler(void);
......
Supports Markdown
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