Changeset 15084 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 8, 2008 4:30:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r15083 r15084 27 27 } while(0) 28 28 # else /* !RT_OS_WINDOWS */ 29 # define DO_ENGAGE_EVENT1(so, fdset0, label) \ 30 goto label; 29 # define DO_ENGAGE_EVENT1(so, fdset0, label) \ 30 do { \ 31 rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_ALL_EVENTS); \ 32 if (rc == SOCKET_ERROR) \ 33 { \ 34 /* This should not happen */ \ 35 error = WSAGetLastError(); \ 36 LogRel(("WSAEventSelector (" #label ") error %d (so=%x, socket=%s, event=%x)\n", \ 37 error, so, so->s, VBOX_SOCKET_EVENT)); \ 38 } \ 39 } while(0); \ 31 40 32 41 # define DO_ENGAGE_EVENT2(so, fdset0, fdset1, label) DO_ENGAGE_EVENT1((so), (fdset0), label) … … 34 43 35 44 # define TCP_ENGAGE_EVENT1(so, fdset0) \ 36 DO_ENGAGE_EVENT1((so), (fdset0), tcp_engage_event)45 DO_ENGAGE_EVENT1((so), (fdset0), TCP) 37 46 38 47 # define TCP_ENGAGE_EVENT2(so, fdset0, fdset1) \ 39 DO_ENGAGE_EVENT2((so), (fdset0), (fdset1), tcp_engage_event) 48 DO_ENGAGE_EVENT2((so), (fdset0), (fdset1), TCP) 49 50 #define UDP_ENGAGE_EVENT(so, fdset) DO_ENGAGE_EVENT1((so), (fdset), UDP) 40 51 #endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */ 41 52 … … 491 502 STAM_REL_COUNTER_INC(&pData->StatTCPHot); 492 503 TCP_ENGAGE_EVENT1(so, readfds); 493 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)494 tcp_engage_event:495 rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_ALL_EVENTS);496 if (rc == SOCKET_ERROR)497 {498 /* This should not happen */499 error = WSAGetLastError();500 LogRel(("WSAEventSelector (TCP) error %d (so=%x, socket=%s, event=%x)\n",501 error, so, so->s, VBOX_SOCKET_EVENT));502 }503 #endif504 504 continue; 505 505 } … … 574 574 { 575 575 STAM_REL_COUNTER_INC(&pData->StatUDPHot); 576 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS) 577 FD_SET(so->s, readfds); 578 UPD_NFDS(so->s); 579 #else 580 rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_ALL_EVENTS); 581 if (rc == SOCKET_ERROR) 582 { 583 /* This should not happen */ 584 error = WSAGetLastError(); 585 LogRel(("WSAEventSelector (UDP) error %d (so=%x, socket=%s, event=%x)\n", 586 error, so, so->s, VBOX_SOCKET_EVENT)); 587 } 588 #endif 576 UDP_ENGAGE_EVENT(so, readfds); 589 577 } 590 578 }
Note:
See TracChangeset
for help on using the changeset viewer.