version 1.267, 2017/11/25 06:46:22 |
version 1.268, 2017/12/10 05:55:29 |
|
|
fatal("%s: %s", __func__, ssh_err(r)); |
fatal("%s: %s", __func__, ssh_err(r)); |
} |
} |
|
|
static void |
void |
fmt_connection_id(struct ssh *ssh, char *s, size_t l) |
sshpkt_fmt_connection_id(struct ssh *ssh, char *s, size_t l) |
{ |
{ |
snprintf(s, l, "%.200s%s%s port %d", |
snprintf(s, l, "%.200s%s%s port %d", |
ssh->log_preamble ? ssh->log_preamble : "", |
ssh->log_preamble ? ssh->log_preamble : "", |
|
|
{ |
{ |
char remote_id[512]; |
char remote_id[512]; |
|
|
fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
|
|
switch (r) { |
switch (r) { |
case SSH_ERR_CONN_CLOSED: |
case SSH_ERR_CONN_CLOSED: |
|
|
* Format the message. Note that the caller must make sure the |
* Format the message. Note that the caller must make sure the |
* message is of limited size. |
* message is of limited size. |
*/ |
*/ |
fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
va_start(args, fmt); |
va_start(args, fmt); |
vsnprintf(buf, sizeof(buf), fmt, args); |
vsnprintf(buf, sizeof(buf), fmt, args); |
va_end(args); |
va_end(args); |