Changeset 14165 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 13, 2008 10:18:02 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r14163 r14165 226 226 } 227 227 #ifdef VBOX_WITH_SIMPLEFIED_SLIRP_SYNC 228 /*XXX:probably should be configurable*/229 228 pData->cMaxEvent = WSA_MAXIMUM_WAIT_EVENTS; 229 pData->iCurrentEventIndex = 1; /* 0 - reserved for Sent event*/ 230 pData->iCurrentSocketIndex = 0; 230 231 pData->phEvents = malloc(sizeof(HANDLE) * pData->cMaxEvent); 231 232 for (i = 1; i < WSA_MAXIMUM_WAIT_EVENTS; ++i) { -
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r14119 r14165 119 119 int cMaxEvent; 120 120 HANDLE *phEvents; 121 int iCurrentSocketIndex; 122 int iCurrentEventIndex; 121 123 #endif 122 124 } NATState; -
trunk/src/VBox/Devices/Network/slirp/socket.c
r14159 r14165 739 739 void soregister_event(struct NATState *pData, struct socket *so) 740 740 { 741 static int soidx;742 static int eidx = 1;743 741 744 if ( soidx >= WSA_MAXIMUM_WAIT_EVENTS * eidx) {745 eidx++;746 } 747 so->hNetworkEvent = pData->phEvents[ eidx];748 soidx++;749 } 750 #endif 742 if (pData->iCurrentSocketIndex >= WSA_MAXIMUM_WAIT_EVENTS * pData->iCurrentEventIndex) { 743 pData->iCurrentEventIndex++; 744 } 745 so->hNetworkEvent = pData->phEvents[pData->iCurrentEventIndex]; 746 pData->iCurrentSocketIndex++; 747 } 748 #endif
Note:
See TracChangeset
for help on using the changeset viewer.