Changeset 14330 in vbox for trunk/src/VBox
- Timestamp:
- Nov 18, 2008 10:01:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r14305 r14330 311 311 fd_set XcptFDs; 312 312 int nFDs = -1; 313 unsigned int ms; 313 314 # ifdef RT_OS_WINDOWS 314 315 DWORD event; … … 339 340 */ 340 341 slirp_select_fill(pThis->pNATState, &nFDs, &ReadFDs, &WriteFDs, &XcptFDs); 342 ms = slirp_get_timeout_ms(pThis->pNATState); 341 343 # ifndef RT_OS_WINDOWS 342 struct timeval tv = { 0, 2000 }; /* 2ms */344 struct timeval tv = { 0, ms*1000 }; 343 345 FD_SET(pThis->PipeRead, &ReadFDs); 344 346 nFDs = ((int)pThis->PipeRead < nFDs ? nFDs : pThis->PipeRead); 345 int cChangedFDs = select(nFDs + 1, &ReadFDs, &WriteFDs, &XcptFDs, &tv);347 int cChangedFDs = select(nFDs + 1, &ReadFDs, &WriteFDs, &XcptFDs, ms ? &tv : NULL); 346 348 if (cChangedFDs >= 0) 347 349 { … … 358 360 } 359 361 # else /* RT_OS_WINDOWS */ 360 event = WSAWaitForMultipleEvents(nFDs, phEvents, FALSE, 2 /*ms*/, FALSE);362 event = WSAWaitForMultipleEvents(nFDs, phEvents, FALSE, ms ? ms : WSA_INFINITE, FALSE); 361 363 if ( (event < WSA_WAIT_EVENT_0 || event > WSA_WAIT_EVENT_0 + nFDs - 1) 362 364 && event != WSA_WAIT_TIMEOUT)
Note:
See TracChangeset
for help on using the changeset viewer.