Changeset 7389 for code/branches/ipv6/src/external/enet/unix.c
- Timestamp:
- Sep 9, 2010, 1:09:09 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ipv6/src/external/enet/unix.c
r7377 r7389 120 120 if (family == ENET_IPV4 && 121 121 (enet_get_address_family (address) == ENET_IPV4 || 122 !memcmp ( address, & ENET_HOST_ANY, sizeof(ENetHostAddress))))122 !memcmp (& address -> host, & ENET_HOST_ANY, sizeof(ENetHostAddress)))) 123 123 { 124 124 ((struct sockaddr_in *) sin) -> sin_family = AF_INET; … … 398 398 enet_socket_wait (ENetSocket socket4, ENetSocket socket6, enet_uint32 * condition, enet_uint32 timeout) 399 399 { 400 //FIXME allow only one of the sockets being available401 400 //#ifdef HAS_POLL 402 401 struct pollfd pollSocket[2]; 403 402 int pollCount; 404 403 405 404 pollSocket[0].fd = socket4; 406 405 pollSocket[1].fd = socket6; 407 406 pollSocket[0].events = 0; 408 407 pollSocket[1].events = 0; 408 //pollSocket[0].revents = 0; 409 pollSocket[1].revents = 0; 410 411 if (pollSocket[0].fd == ENET_SOCKET_NULL) 412 { 413 pollSocket[0].fd = pollSocket[1].fd; 414 pollSocket[1].fd = ENET_SOCKET_NULL; 415 } 409 416 410 417 if (* condition & ENET_SOCKET_WAIT_SEND) … … 420 427 } 421 428 422 pollCount = poll (pollSocket, 2, timeout);429 pollCount = poll (pollSocket, pollSocket[1].fd != ENET_SOCKET_NULL ? 2 : 1, timeout); 423 430 424 431 if (pollCount < 0) … … 438 445 return 0; 439 446 /* 440 FIXME: implement this447 FIXME: implement or remove this 441 448 #else 442 449 fd_set readSet, writeSet;
Note: See TracChangeset
for help on using the changeset viewer.