Changeset 7390 for code/branches/ipv6/src/external/enet/patches/0003-using-address-family-in-functions.patch
- Timestamp:
- Sep 9, 2010, 4:30:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ipv6/src/external/enet/patches/0003-using-address-family-in-functions.patch
r7389 r7390 1 From af3c0910bd25d73b1a3c06bbfa4e0a3c6b96ddc5Mon Sep 17 00:00:00 20011 From b26e4ef3fa9c0139fc2ec086d2243b809365d683 Mon Sep 17 00:00:00 2001 2 2 From: Adrian Friedli <adi@koalatux.ch> 3 3 Date: Mon, 6 Sep 2010 14:58:50 +0200 4 Subject: [PATCH 3/ 4] using address family in functions4 Subject: [PATCH 3/5] using address family in functions 5 5 6 6 --- … … 8 8 include/enet/enet.h | 22 +++++++++--- 9 9 protocol.c | 5 ++- 10 unix.c | 8 7++++++++++++++++++++++++++++++++------------------11 4 files changed, 7 7insertions(+), 41 deletions(-)10 unix.c | 86 ++++++++++++++++++++++++++++++++------------------ 11 4 files changed, 76 insertions(+), 41 deletions(-) 12 12 13 13 diff --git a/host.c b/host.c … … 91 91 92 92 diff --git a/unix.c b/unix.c 93 index de032bb.. 13a24d810064493 index de032bb..475c6e3 100644 94 94 --- a/unix.c 95 95 +++ b/unix.c 96 @@ -71,7 +71,2 8@@ enet_time_set (enet_uint32 newTimeBase)96 @@ -71,7 +71,27 @@ enet_time_set (enet_uint32 newTimeBase) 97 97 timeBase = timeVal.tv_sec * 1000 + timeVal.tv_usec / 1000 - newTimeBase; 98 98 } … … 119 119 +} 120 120 + 121 +122 121 +static ENetAddressFamily 123 122 enet_address_set_address (ENetAddress * address, const struct sockaddr * sin) 124 123 { 125 124 memset (address, 0, sizeof (ENetAddress)); 126 @@ -80,32 +10 1,31 @@ enet_address_set_address (ENetAddress * address, const struct sockaddr * sin)125 @@ -80,32 +100,31 @@ enet_address_set_address (ENetAddress * address, const struct sockaddr * sin) 127 126 address -> host = enet_address_map4 ((((struct sockaddr_in *) sin) -> sin_addr.s_addr)); 128 127 //address -> scopeID = 0; … … 164 163 ((struct sockaddr_in6 *) sin) -> sin6_addr = * (struct in6_addr *) & address -> host; 165 164 ((struct sockaddr_in6 *) sin) -> sin6_scope_id = address -> scopeID; 166 @@ -132,7 +15 2,7 @@ enet_address_set_host (ENetAddress * address, const char * name)165 @@ -132,7 +151,7 @@ enet_address_set_host (ENetAddress * address, const char * name) 167 166 168 167 for (res = result; res != NULL; res = res -> ai_next) … … 173 172 } 174 173 175 @@ -147,9 +16 7,9 @@ static int174 @@ -147,9 +166,9 @@ static int 176 175 enet_address_get_host_x (const ENetAddress * address, char * name, size_t nameLength, int flags) 177 176 { … … 185 184 186 185 return 0; 187 @@ -168,21 +18 8,21 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng186 @@ -168,21 +187,21 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng 188 187 } 189 188 … … 211 210 212 211 int 213 @@ -192,13 +21 2,16 @@ enet_socket_listen (ENetSocket socket, int backlog)212 @@ -192,13 +211,16 @@ enet_socket_listen (ENetSocket socket, int backlog) 214 213 } 215 214 … … 232 231 233 232 return sock; 234 @@ -241,25 +26 4,25 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)233 @@ -241,25 +263,25 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) 235 234 } 236 235 … … 264 263 return ENET_SOCKET_NULL; 265 264 266 @@ -281,7 +30 4,8 @@ int265 @@ -281,7 +303,8 @@ int 267 266 enet_socket_send (ENetSocket socket, 268 267 const ENetAddress * address, … … 274 273 struct msghdr msgHdr; 275 274 struct sockaddr_storage sin; 276 @@ -291,9 +31 5,9 @@ enet_socket_send (ENetSocket socket,275 @@ -291,9 +314,9 @@ enet_socket_send (ENetSocket socket, 277 276 278 277 if (address != NULL) … … 286 285 287 286 msgHdr.msg_iov = (struct iovec *) buffers; 288 @@ -316,7 +3 40,8 @@ int287 @@ -316,7 +339,8 @@ int 289 288 enet_socket_receive (ENetSocket socket, 290 289 ENetAddress * address, … … 296 295 struct msghdr msgHdr; 297 296 struct sockaddr_storage sin; 298 @@ -327,7 +35 2,7 @@ enet_socket_receive (ENetSocket socket,297 @@ -327,7 +351,7 @@ enet_socket_receive (ENetSocket socket, 299 298 if (address != NULL) 300 299 {
Note: See TracChangeset
for help on using the changeset viewer.