version 1.111, 2003/09/19 11:33:09 |
version 1.112, 2003/09/23 20:17:11 |
|
|
len = read(connection_in, buf, sizeof(buf)); |
len = read(connection_in, buf, sizeof(buf)); |
if (len == 0) { |
if (len == 0) { |
logit("Connection closed by %.200s", get_remote_ipaddr()); |
logit("Connection closed by %.200s", get_remote_ipaddr()); |
fatal_cleanup(); |
cleanup_exit(255); |
} |
} |
if (len < 0) |
if (len < 0) |
fatal("Read from socket failed: %.100s", strerror(errno)); |
fatal("Read from socket failed: %.100s", strerror(errno)); |
|
|
logit("Received disconnect from %s: %u: %.400s", |
logit("Received disconnect from %s: %u: %.400s", |
get_remote_ipaddr(), reason, msg); |
get_remote_ipaddr(), reason, msg); |
xfree(msg); |
xfree(msg); |
fatal_cleanup(); |
cleanup_exit(255); |
break; |
break; |
case SSH2_MSG_UNIMPLEMENTED: |
case SSH2_MSG_UNIMPLEMENTED: |
seqnr = packet_get_int(); |
seqnr = packet_get_int(); |
|
|
msg = packet_get_string(NULL); |
msg = packet_get_string(NULL); |
logit("Received disconnect from %s: %.400s", |
logit("Received disconnect from %s: %.400s", |
get_remote_ipaddr(), msg); |
get_remote_ipaddr(), msg); |
fatal_cleanup(); |
cleanup_exit(255); |
xfree(msg); |
xfree(msg); |
break; |
break; |
default: |
default: |
|
|
|
|
/* Close the connection. */ |
/* Close the connection. */ |
packet_close(); |
packet_close(); |
fatal_cleanup(); |
cleanup_exit(255); |
} |
} |
|
|
/* Checks if there is any buffered output, and tries to write some of the output. */ |
/* Checks if there is any buffered output, and tries to write some of the output. */ |