mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 02:27:32 -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:
4
psftp.c
4
psftp.c
@ -952,7 +952,7 @@ int sftp_cmd_close(struct sftp_command *cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (back != NULL && back->socket(backhandle) != NULL) {
|
||||
if (back != NULL && back->connected(backhandle)) {
|
||||
char ch;
|
||||
back->special(backhandle, TS_EOF);
|
||||
sftp_recvdata(&ch, 1);
|
||||
@ -2909,7 +2909,7 @@ int psftp_main(int argc, char *argv[])
|
||||
|
||||
do_sftp(mode, modeflags, batchfile);
|
||||
|
||||
if (back != NULL && back->socket(backhandle) != NULL) {
|
||||
if (back != NULL && back->connected(backhandle)) {
|
||||
char ch;
|
||||
back->special(backhandle, TS_EOF);
|
||||
sftp_recvdata(&ch, 1);
|
||||
|
Reference in New Issue
Block a user