Use 127.0.0.1 for wserv socket, which fixes /WINDOW CREATE with IPv6
If wserv is told to connect to "localhost" it might try to connect to ::1, which won't work because the wserv socket is AF_INET only. So explicitly bind the socket and make the connection to "127.0.0.1" instead.
This commit is contained in:
@@ -1599,7 +1599,7 @@ extern Window *BX_create_additional_screen (void)
|
||||
screen_type == ST_SCREEN ? "screen" :
|
||||
"wound" );
|
||||
port = 0;
|
||||
s = connect_by_number(NULL, &port, SERVICE_SERVER, PROTOCOL_TCP, 0);
|
||||
s = connect_by_number("127.0.0.1", &port, SERVICE_SERVER, PROTOCOL_TCP, 0);
|
||||
if (s < 0)
|
||||
{
|
||||
yell("Couldn't establish server side -- error [%d]", s);
|
||||
@@ -1676,7 +1676,7 @@ extern Window *BX_create_additional_screen (void)
|
||||
}
|
||||
|
||||
*args_ptr++ = WSERV_PATH;
|
||||
*args_ptr++ = "localhost";
|
||||
*args_ptr++ = "127.0.0.1";
|
||||
*args_ptr++ = ltoa((long)port);
|
||||
*args_ptr++ = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user