[Orxonox-commit 2691] r7396 - code/branches/ipv6/src/external/enet

adrfried at orxonox.net adrfried at orxonox.net
Fri Sep 10 03:14:40 CEST 2010


Author: adrfried
Date: 2010-09-10 03:14:40 +0200 (Fri, 10 Sep 2010)
New Revision: 7396

Modified:
   code/branches/ipv6/src/external/enet/host.c
Log:
always bind to sockets, even in client mode

Maybe the WSAEINVAL on Windows goes away with this.

TODO:
Check if there are any side effects of this action.
Are there any half-opened connections, if someone tries to connect to
the client?
Surely there is an useless bind on one of the two socket wich is not
used.

Modified: code/branches/ipv6/src/external/enet/host.c
===================================================================
--- code/branches/ipv6/src/external/enet/host.c	2010-09-09 20:59:01 UTC (rev 7395)
+++ code/branches/ipv6/src/external/enet/host.c	2010-09-10 01:14:40 UTC (rev 7396)
@@ -14,7 +14,7 @@
     if (socket == ENET_SOCKET_NULL)
         return ENET_SOCKET_NULL;
 
-    if (address != NULL && enet_socket_bind (socket, address, family) < 0)
+    if (enet_socket_bind (socket, address, family) < 0)
     {
         enet_socket_destroy (socket);
         return ENET_SOCKET_NULL;




More information about the Orxonox-commit mailing list