TMXR: All sockets should default to non blocking

This commit is contained in:
Mark Pizzolato 2020-04-13 17:29:42 -07:00
parent 07682806a5
commit ee1c055abe

View file

@ -1648,8 +1648,7 @@ if (lp->mp && lp->modem_control) { /* This API ONLY works on mo
sprintf (msg, "tmxr_set_get_modem_bits() - establishing outgoing connection to: %s", lp->destination); sprintf (msg, "tmxr_set_get_modem_bits() - establishing outgoing connection to: %s", lp->destination);
tmxr_debug_connect_line (lp, msg); tmxr_debug_connect_line (lp, msg);
lp->connecting = sim_connect_sock_ex (lp->datagram ? lp->port : NULL, lp->destination, "localhost", NULL, (lp->datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | lp->connecting = sim_connect_sock_ex (lp->datagram ? lp->port : NULL, lp->destination, "localhost", NULL, (lp->datagram ? SIM_SOCK_OPT_DATAGRAM : 0) |
(lp->packet ? SIM_SOCK_OPT_NODELAY : 0) | (lp->packet ? SIM_SOCK_OPT_NODELAY : 0));
SIM_SOCK_OPT_BLOCKING);
} }
} }
} }
@ -2805,8 +2804,7 @@ while (*tptr) {
return sim_messagef (SCPE_ARG, "Unexpected specifier: %s\n", eptr); return sim_messagef (SCPE_ARG, "Unexpected specifier: %s\n", eptr);
} }
sock = sim_connect_sock_ex (NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | sock = sim_connect_sock_ex (NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) |
(packet ? SIM_SOCK_OPT_NODELAY : 0) | (packet ? SIM_SOCK_OPT_NODELAY : 0));
SIM_SOCK_OPT_BLOCKING);
if (sock != INVALID_SOCKET) if (sock != INVALID_SOCKET)
sim_close_sock (sock); sim_close_sock (sock);
else else
@ -2959,8 +2957,7 @@ while (*tptr) {
} }
lp->packet = packet; lp->packet = packet;
sock = sim_connect_sock_ex (datagram ? listen : NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | sock = sim_connect_sock_ex (datagram ? listen : NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) |
(packet ? SIM_SOCK_OPT_NODELAY : 0) | (packet ? SIM_SOCK_OPT_NODELAY : 0));
SIM_SOCK_OPT_BLOCKING);
if (sock != INVALID_SOCKET) { if (sock != INVALID_SOCKET) {
_mux_detach_line (lp, FALSE, TRUE); _mux_detach_line (lp, FALSE, TRUE);
lp->destination = (char *)malloc(1+strlen(hostport)); lp->destination = (char *)malloc(1+strlen(hostport));