summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2012-07-05 13:33:55 +0000
committerTim Angus <tim@ngus.net>2013-01-12 20:46:30 +0000
commitd56e8c594d611a96d662c1b0b7a48678b8f93484 (patch)
tree70fb27a5d3f5775713fcdbabf577f35e43f7012b
parent91bdb0958201702e3d154ec6a0ffdd9e64266c0a (diff)
We should not try to broadcast via the IPv4 socket if that socket is closed.
Previously, error messages were generated when querying local servers while IPv4 was disabled. Patch from /dev/humancontroller.
-rw-r--r--src/qcommon/net_ip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c
index 18a21681..8594ac99 100644
--- a/src/qcommon/net_ip.c
+++ b/src/qcommon/net_ip.c
@@ -648,6 +648,7 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) {
}
if( (ip_socket == INVALID_SOCKET && to.type == NA_IP) ||
+ (ip_socket == INVALID_SOCKET && to.type == NA_BROADCAST) ||
(ip6_socket == INVALID_SOCKET && to.type == NA_IP6) ||
(ip6_socket == INVALID_SOCKET && to.type == NA_MULTICAST6) )
return;
@@ -687,7 +688,7 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) {
return;
}
- Com_Printf( "NET_SendPacket: %s\n", NET_ErrorString() );
+ Com_Printf( "Sys_SendPacket: %s\n", NET_ErrorString() );
}
}