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