Skip to content
Snippets Groups Projects
Commit 748fa366 authored by Logan Aerl Arias's avatar Logan Aerl Arias
Browse files

Merge branch 'ipv6' into 'master'

netcode: fix runtime issues with -noipv4

See merge request STJr/SRB2!2646
parents 854fc956 646929d8
No related branches found
No related tags found
No related merge requests found
...@@ -656,7 +656,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr ...@@ -656,7 +656,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr
return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d); return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d);
} }
#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH) #define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH || (x) == EADDRNOTAVAIL)
static void SOCK_Send(void) static void SOCK_Send(void)
{ {
...@@ -710,7 +710,7 @@ static void SOCK_Send(void) ...@@ -710,7 +710,7 @@ static void SOCK_Send(void)
} }
} }
if (c == ERRSOCKET && e != -1) // -1 means no socket for the address family was found if (c == ERRSOCKET && e != 0) // 0 means no socket for the address family was found
{ {
if (!ALLOWEDERROR(e)) if (!ALLOWEDERROR(e))
I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment