mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Added a fourth application: plink, a command line connection utility
[originally from svn r575]
This commit is contained in:
8
telnet.c
8
telnet.c
@ -552,7 +552,7 @@ static char *telnet_init (HWND hwnd, char *host, int port, char **realhost) {
|
||||
default: return "connect(): unknown error";
|
||||
}
|
||||
|
||||
if (WSAAsyncSelect (s, hwnd, WM_NETEVENT, FD_READ |
|
||||
if (hwnd && WSAAsyncSelect (s, hwnd, WM_NETEVENT, FD_READ |
|
||||
FD_WRITE | FD_OOB | FD_CLOSE) == SOCKET_ERROR)
|
||||
switch (WSAGetLastError()) {
|
||||
case WSAENETDOWN: return "Network is down";
|
||||
@ -631,7 +631,6 @@ static int telnet_msg (WPARAM wParam, LPARAM lParam) {
|
||||
s = INVALID_SOCKET;
|
||||
return 0;
|
||||
}
|
||||
|
||||
do_telnet_read (buf, ret);
|
||||
} while (in_synch);
|
||||
}
|
||||
@ -733,10 +732,13 @@ static void telnet_special (Telnet_Special code) {
|
||||
}
|
||||
}
|
||||
|
||||
SOCKET telnet_socket(void) { return s; }
|
||||
|
||||
Backend telnet_backend = {
|
||||
telnet_init,
|
||||
telnet_msg,
|
||||
telnet_send,
|
||||
telnet_size,
|
||||
telnet_special
|
||||
telnet_special,
|
||||
telnet_socket
|
||||
};
|
||||
|
Reference in New Issue
Block a user