Return to commands.c CVS log | Up to [local] / src / usr.bin / telnet |
version 1.79, 2015/11/13 17:04:48 | version 1.80, 2015/11/20 12:43:37 | ||
---|---|---|---|
|
|
||
close_connection(void) | close_connection(void) | ||
{ | { | ||
if (connected) { | if (connected) { | ||
(void) shutdown(net, 2); | (void) shutdown(net, SHUT_RDWR); | ||
printf("Connection closed.\r\n"); | printf("Connection closed.\r\n"); | ||
(void)close(net); | (void)close(net); | ||
connected = 0; | connected = 0; |