Commit 32a45594 authored by Niels Möller's avatar Niels Möller
Browse files

* src/connection.c (make_ssh_connection): New argument

debug_comment.

Rev: src/connection.c:1.46
Rev: src/connection.h:1.43
parent cf8be0f6
......@@ -228,12 +228,14 @@ make_exc_protocol_handler(struct ssh_connection *connection,
}
struct ssh_connection *
make_ssh_connection(struct command_continuation *c,
make_ssh_connection(const char *debug_comment,
struct command_continuation *c,
struct exception_handler *e)
{
int i;
NEW(ssh_connection, connection);
connection->debug_comment = debug_comment;
connection->super.write = handle_connection;
/* Exception handler that sends a proper disconnect message on protocol errors */
......@@ -332,7 +334,9 @@ void connection_init_io(struct ssh_connection *connection,
connection,
r),
connection),
"Sent");
(connection->debug_comment
? ssh_format("%lz sent", connection->debug_comment)
: ssh_format("Sent")));
/* Initial encryption state */
connection->send_crypto = connection->rec_crypto = NULL;
......
......@@ -71,6 +71,9 @@
; Sent and received version strings
(versions array (string) 2)
(session_id string)
; Connection description, used for debug messages.
(debug_comment simple "const char *")
; Features or bugs peculiar to the peer
(peer_flags simple UINT32)
......@@ -135,7 +138,8 @@
#define C_WRITE(c, s) A_WRITE((c)->write, (s) )
struct ssh_connection *
make_ssh_connection(struct command_continuation *c,
make_ssh_connection(const char *id_comment,
struct command_continuation *c,
struct exception_handler *e);
struct exception_handler *
......
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