mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
disconnect
This commit is contained in:
parent
b3e1972622
commit
e02c18b7bf
1 changed files with 5 additions and 3 deletions
|
@ -138,10 +138,11 @@ U0 InputTask(U0 *args) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CH_ESC:
|
||||||
|
TCPSocketSendString(sock, 0x27);
|
||||||
|
break;
|
||||||
case CH_SHIFT_ESC:
|
case CH_SHIFT_ESC:
|
||||||
force_disconnect = TRUE;
|
force_disconnect = TRUE;
|
||||||
TCPSocketClose(sock);
|
|
||||||
"Telnet connection closed.\n";
|
|
||||||
break;
|
break;
|
||||||
// send buffer on enter
|
// send buffer on enter
|
||||||
case '\n':
|
case '\n':
|
||||||
|
@ -551,11 +552,12 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// sock(CTCPSocket *)->timeout = 0;
|
// sock(CTCPSocket *)->timeout = 0;
|
||||||
while (TaskValidate(input_task))
|
while (TaskValidate(input_task) && !force_disconnect)
|
||||||
{
|
{
|
||||||
Refresh;
|
Refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kill(input_task);
|
||||||
// sock(CTCPSocket *)->timeout = TCP_TIMEOUT;
|
// sock(CTCPSocket *)->timeout = TCP_TIMEOUT;
|
||||||
TCPSocketClose(sock);
|
TCPSocketClose(sock);
|
||||||
"Telnet connection closed.\n";
|
"Telnet connection closed.\n";
|
||||||
|
|
Loading…
Reference in a new issue