mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 12:32:47 -05:00
The `socket' function in the backends is only ever checked to see if
it's NULL. Since we already have one back end (uxpty) which doesn't in fact talk to a network socket, and may well have more soon, I'm replacing this TCP/IP-centric function with a nice neutral `connected' function returning a boolean. Nothing else about its semantics has currently changed. [originally from svn r6810]
This commit is contained in:
6
ssh.c
6
ssh.c
@ -8725,10 +8725,10 @@ void ssh_send_port_open(void *channel, char *hostname, int port, char *org)
|
||||
}
|
||||
}
|
||||
|
||||
static Socket ssh_socket(void *handle)
|
||||
static int ssh_connected(void *handle)
|
||||
{
|
||||
Ssh ssh = (Ssh) handle;
|
||||
return ssh->s;
|
||||
return ssh->s != NULL;
|
||||
}
|
||||
|
||||
static int ssh_sendok(void *handle)
|
||||
@ -8798,7 +8798,7 @@ Backend ssh_backend = {
|
||||
ssh_size,
|
||||
ssh_special,
|
||||
ssh_get_specials,
|
||||
ssh_socket,
|
||||
ssh_connected,
|
||||
ssh_return_exitcode,
|
||||
ssh_sendok,
|
||||
ssh_ldisc,
|
||||
|
Reference in New Issue
Block a user