mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22: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
raw.c
6
raw.c
@ -209,10 +209,10 @@ static const struct telnet_special *raw_get_specials(void *handle)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Socket raw_socket(void *handle)
|
||||
static int raw_connected(void *handle)
|
||||
{
|
||||
Raw raw = (Raw) handle;
|
||||
return raw->s;
|
||||
return raw->s != NULL;
|
||||
}
|
||||
|
||||
static int raw_sendok(void *handle)
|
||||
@ -270,7 +270,7 @@ Backend raw_backend = {
|
||||
raw_size,
|
||||
raw_special,
|
||||
raw_get_specials,
|
||||
raw_socket,
|
||||
raw_connected,
|
||||
raw_exitcode,
|
||||
raw_sendok,
|
||||
raw_ldisc,
|
||||
|
Reference in New Issue
Block a user