diff --git a/fteqtv/netchan.c b/fteqtv/netchan.c index e2a649bc1..84487ae12 100644 --- a/fteqtv/netchan.c +++ b/fteqtv/netchan.c @@ -112,7 +112,7 @@ void NET_InitUDPSocket(cluster_t *cluster, int port, int socketid) Sys_Printf(cluster, "opened udp port %i\n", port); } -SOCKET NET_ChooseSocket(SOCKET sock[2], netadr_t *toadr, netadr_t ina) +SOCKET NET_ChooseSocket(SOCKET sock[SOCKETGROUPS], netadr_t *toadr, netadr_t ina) { #ifdef AF_INET6 if (((struct sockaddr *)ina.sockaddr)->sa_family == AF_INET6) @@ -120,7 +120,7 @@ SOCKET NET_ChooseSocket(SOCKET sock[2], netadr_t *toadr, netadr_t ina) *toadr = ina; return sock[SG_IPV6]; } - if (sock[0] == INVALID_SOCKET && sock[SG_IPV6] != INVALID_SOCKET) + if (sock[SG_IPV4] == INVALID_SOCKET && sock[SG_IPV6] != INVALID_SOCKET) { struct sockaddr_in6 *out = (struct sockaddr_in6*)toadr->sockaddr; struct sockaddr_in *in = (struct sockaddr_in*)ina.sockaddr; diff --git a/fteqtv/qtv.h b/fteqtv/qtv.h index 85a9c6061..1bf8b7956 100644 --- a/fteqtv/qtv.h +++ b/fteqtv/qtv.h @@ -947,7 +947,7 @@ void Netchan_OutOfBandPrint (cluster_t *cluster, netadr_t adr, char *format, ... //int Netchan_IsLocal (netadr_t adr); void NET_InitUDPSocket(cluster_t *cluster, int port, int socketid); void NET_SendPacket(cluster_t *cluster, SOCKET sock, int length, void *data, netadr_t adr); -SOCKET NET_ChooseSocket(SOCKET sock[], netadr_t *toadr, netadr_t in); +SOCKET NET_ChooseSocket(SOCKET sock[SOCKETGROUPS], netadr_t *toadr, netadr_t in); qboolean Net_CompareAddress(netadr_t *s1, netadr_t *s2, int qp1, int qp2); qboolean Netchan_Process (netchan_t *chan, netmsg_t *msg); qboolean NQNetchan_Process(cluster_t *cluster, netchan_t *chan, netmsg_t *msg);