[Orxonox-commit 2687] r7392 - in code/branches/ipv6/src/external/enet: . include/enet

adrfried at orxonox.net adrfried at orxonox.net
Thu Sep 9 18:00:00 CEST 2010


Author: adrfried
Date: 2010-09-09 18:00:00 +0200 (Thu, 09 Sep 2010)
New Revision: 7392

Modified:
   code/branches/ipv6/src/external/enet/include/enet/enet.h
   code/branches/ipv6/src/external/enet/win32.c
Log:
fix bugs

Modified: code/branches/ipv6/src/external/enet/include/enet/enet.h
===================================================================
--- code/branches/ipv6/src/external/enet/include/enet/enet.h	2010-09-09 15:02:16 UTC (rev 7391)
+++ code/branches/ipv6/src/external/enet/include/enet/enet.h	2010-09-09 16:00:00 UTC (rev 7392)
@@ -58,11 +58,11 @@
    enet_uint8 addr[16];
 } ENetHostAddress;
 
-extern ENET_API const ENetHostAddress ENET_HOST_ANY;          /**< specifies the default server host */
-extern ENET_API const ENetHostAddress ENET_IPV4MAPPED_PREFIX; /**< specifies the IPv4-mapped IPv6 prefix */
-extern ENET_API const ENetHostAddress ENET_HOST_BROADCAST;    /**< specifies a IPv4 subnet-wide broadcast */
-#define ENET_IPV4MAPPED_PREFIX_LEN 12                /**< specifies the length of the IPv4-mapped IPv6 prefix */
-#define ENET_PORT_ANY 0                              /**< specifies that a port should be automatically chosen */
+ENET_API const ENetHostAddress ENET_HOST_ANY;          /**< specifies the default server host */
+ENET_API const ENetHostAddress ENET_IPV4MAPPED_PREFIX; /**< specifies the IPv4-mapped IPv6 prefix */
+ENET_API const ENetHostAddress ENET_HOST_BROADCAST;    /**< specifies a IPv4 subnet-wide broadcast */
+#define ENET_IPV4MAPPED_PREFIX_LEN 12                  /**< specifies the length of the IPv4-mapped IPv6 prefix */
+#define ENET_PORT_ANY 0                                /**< specifies that a port should be automatically chosen */
 
 /**
  * Portable internet address structure. 

Modified: code/branches/ipv6/src/external/enet/win32.c
===================================================================
--- code/branches/ipv6/src/external/enet/win32.c	2010-09-09 15:02:16 UTC (rev 7391)
+++ code/branches/ipv6/src/external/enet/win32.c	2010-09-09 16:00:00 UTC (rev 7392)
@@ -79,7 +79,7 @@
     if (sin -> sa_family == AF_INET)
     {
         address -> host = enet_address_map4 ((((SOCKADDR_IN *) sin) -> sin_addr.s_addr));
-        //address -> scopeID = 0;
+        /* address -> scopeID = 0; */
         address -> port = ENET_NET_TO_HOST_16 (((SOCKADDR_IN *) sin) -> sin_port);
         return ENET_IPV4;
     }
@@ -199,7 +199,7 @@
 ENetSocket
 enet_socket_create (ENetSocketType type, ENetAddressFamily family)
 {
-    return socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0);
+    return socket (enet_af (family), type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0);
 }
 
 int




More information about the Orxonox-commit mailing list