aboutsummaryrefslogtreecommitdiff
path: root/games/r1q2/files
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2007-01-14 22:27:40 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2007-01-14 22:27:40 +0000
commit24804cc9a1b6cb63e1f7c66556aa700d6b947926 (patch)
treebf7b62c588911e1ec6769c7a35867e4d65b02d0d /games/r1q2/files
parent771c23e307f4fed227e1b56ea7d4e0093c00dc8a (diff)
downloadports-24804cc9a1b6cb63e1f7c66556aa700d6b947926.tar.gz
ports-24804cc9a1b6cb63e1f7c66556aa700d6b947926.zip
Notes
Diffstat (limited to 'games/r1q2/files')
-rw-r--r--games/r1q2/files/patch-linux__net_udp.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/games/r1q2/files/patch-linux__net_udp.c b/games/r1q2/files/patch-linux__net_udp.c
index 4bd88480b723..e6cb8ff8aef6 100644
--- a/games/r1q2/files/patch-linux__net_udp.c
+++ b/games/r1q2/files/patch-linux__net_udp.c
@@ -1,5 +1,5 @@
---- linux/net_udp.c.orig Fri Jan 12 23:46:14 2007
-+++ linux/net_udp.c Fri Jan 12 23:59:49 2007
+--- linux/net_udp.c.orig Sun Jan 14 16:56:54 2007
++++ linux/net_udp.c Sun Jan 14 18:17:28 2007
@@ -13,8 +13,12 @@
#include <sys/uio.h>
#include <errno.h>
@@ -21,21 +21,29 @@
//linux makes this needlessly complex, couldn't just return the source of the error in from, oh no...
struct probehdr rcvbuf;
struct iovec iov;
-@@ -308,9 +313,10 @@
+@@ -308,9 +313,19 @@
continue;
}
}
--
++#else
++ err = errno;
+
- //errno = err;
- //Com_Printf ("NET_GetPacket: %s\n", LOG_NET, NET_ErrorString());
-+#else
-+ errno = err;
++ if (err == EWOULDBLOCK)
++ return 0;
++ if (err == ECONNREFUSED)
++ {
++ SockadrToNetadr (&from, net_from);
++ Com_Printf ("NET_GetPacket: %s from %s\n", LOG_NET, NET_ErrorString(), NET_AdrToString (net_from));
++ return -1;
++ }
+ Com_Printf ("NET_GetPacket: %s\n", LOG_NET, NET_ErrorString());
+#endif
return 0;
}
-@@ -426,6 +432,7 @@
+@@ -426,6 +441,7 @@
return 0;
}
@@ -43,7 +51,7 @@
// r1: accept icmp unreachables for quick disconnects
if (!net_no_recverr->intvalue)
{
-@@ -434,6 +441,7 @@
+@@ -434,6 +450,7 @@
Com_Printf ("UDP_OpenSocket: Couldn't set IP_RECVERR: %s\n", LOG_NET, NET_ErrorString());
}
}