[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18445 - in gnunet/src: include nat
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18445 - in gnunet/src: include nat |
Date: |
Tue, 6 Dec 2011 13:49:06 +0100 |
Author: grothoff
Date: 2011-12-06 13:49:06 +0100 (Tue, 06 Dec 2011)
New Revision: 18445
Modified:
gnunet/src/include/platform.h
gnunet/src/include/winproc.h
gnunet/src/nat/gnunet-helper-nat-client-windows.c
gnunet/src/nat/gnunet-helper-nat-server-windows.c
Log:
LRN: Fixing Mantis #1974: On W32 winsock2.h defines FD_SETSIZE (if it was not
defined before inclusion of the header) to 64, which means that it's not
possible to select on more than 64 sockets at once. This might work during the
tests, but in the wild people might want to have more than 60 connections, at
least in the transport service.
The patch attached should increase the limit to 1024.
Modified: gnunet/src/include/platform.h
===================================================================
--- gnunet/src/include/platform.h 2011-12-06 12:47:44 UTC (rev 18444)
+++ gnunet/src/include/platform.h 2011-12-06 12:49:06 UTC (rev 18445)
@@ -77,6 +77,9 @@
#endif
#ifdef _MSC_VER
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 1024
+#endif
#include <Winsock2.h>
#include <ws2tcpip.h>
#else
Modified: gnunet/src/include/winproc.h
===================================================================
--- gnunet/src/include/winproc.h 2011-12-06 12:47:44 UTC (rev 18444)
+++ gnunet/src/include/winproc.h 2011-12-06 12:49:06 UTC (rev 18445)
@@ -34,6 +34,9 @@
#include <sys/timeb.h>
#include <time.h>
#include <dirent.h>
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 1024
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
Modified: gnunet/src/nat/gnunet-helper-nat-client-windows.c
===================================================================
--- gnunet/src/nat/gnunet-helper-nat-client-windows.c 2011-12-06 12:47:44 UTC
(rev 18444)
+++ gnunet/src/nat/gnunet-helper-nat-client-windows.c 2011-12-06 12:49:06 UTC
(rev 18445)
@@ -43,6 +43,7 @@
*/
#define _GNU_SOURCE
+#define FD_SETSIZE 1024
#include <winsock2.h>
#include <ws2tcpip.h>
#include <sys/time.h>
Modified: gnunet/src/nat/gnunet-helper-nat-server-windows.c
===================================================================
--- gnunet/src/nat/gnunet-helper-nat-server-windows.c 2011-12-06 12:47:44 UTC
(rev 18444)
+++ gnunet/src/nat/gnunet-helper-nat-server-windows.c 2011-12-06 12:49:06 UTC
(rev 18445)
@@ -42,7 +42,7 @@
*/
#define _GNU_SOURCE
-
+#define FD_SETSIZE 1024
#include <winsock2.h>
#include <ws2tcpip.h>
#include <sys/time.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18445 - in gnunet/src: include nat,
gnunet <=