mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
TMXR: Properly reference incoming socket in tmxr_close_master
A "ringing" (pending incoming) connection is only possible when a listening socket exists.
This commit is contained in:
parent
912f421144
commit
18c594004e
@ -4178,18 +4178,18 @@ for (i = 0; i < mp->lines; i++) { /* loop thru conn */
|
||||
lp->modembits = 0;
|
||||
}
|
||||
|
||||
if (mp->master)
|
||||
if (mp->master) {
|
||||
sim_close_sock (mp->master); /* close master socket */
|
||||
if (mp->ring_sock != INVALID_SOCKET)
|
||||
sim_close_sock (mp->ring_sock); /* close any pending incoming connection */
|
||||
}
|
||||
mp->master = 0;
|
||||
free (mp->port);
|
||||
mp->port = NULL;
|
||||
if (mp->ring_sock != INVALID_SOCKET) {
|
||||
sim_close_sock (mp->ring_sock);
|
||||
mp->ring_sock = INVALID_SOCKET;
|
||||
free (mp->ring_ipad);
|
||||
mp->ring_ipad = NULL;
|
||||
mp->ring_start_time = 0;
|
||||
}
|
||||
_tmxr_remove_from_open_list (mp);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user