Changeset 106678 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Oct 25, 2024 7:36:01 AM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 165547
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNATlibslirp.cpp
r106675 r106678 778 778 size_t cbRead; 779 779 uint64_t cbWakeupNotifs = ASMAtomicReadU64(&pThis->cbWakeupNotifs); 780 781 if (cbWakeupNotifs > 1024) 782 { 783 RTPipeRead(pThis->hPipeRead, &ch, 1024, &cbRead); 784 ASMAtomicSubU64(&pThis->cbWakeupNotifs, 1024); 785 } 786 else 787 { 788 RTPipeRead(pThis->hPipeRead, &ch, cbWakeupNotifs, &cbRead); 789 ASMAtomicSubU64(&pThis->cbWakeupNotifs, cbRead); 790 } 780 RTPipeRead(pThis->hPipeRead, &ch[0], RT_MIN(cbWakeupNotifs, 1024), &cbRead); 781 ASMAtomicSubU64(&pThis->cbWakeupNotifs, cbRead); 791 782 } 792 783 … … 800 791 slirp_pollfds_fill(pThis->pNATState->pSlirp, &msTimeout, drvNAT_AddPollCb /* SlirpAddPollCb */, pThis /* opaque */); 801 792 drvNAT_UpdateTimeout(&msTimeout, pThis); 802 .h 793 803 794 int cChangedFDs = WSAPoll(pThis->pNATState->polls, pThis->pNATState->nsock, msTimeout /* timeout */); 804 795 int error = WSAGetLastError(); … … 820 811 size_t cbRead; 821 812 uint64_t cbWakeupNotifs = ASMAtomicReadU64(&pThis->cbWakeupNotifs); 822 823 if (cbWakeupNotifs > 1024) 824 { 825 cbRead = recv(pThis->pWakeupSockPair[1], &ch, 1024, NULL); 826 ASMAtomicSubU64(&pThis->cbWakeupNotifs, 1024); 827 } 828 else 829 { 830 cbRead = recv(pThis->pWakeupSockPair[1], &ch, cbWakeupNotifs, NULL); 831 ASMAtomicSubU64(&pThis->cbWakeupNotifs, cbRead); 832 } 813 cbRead = recv(pThis->pWakeupSockPair[1], &ch[0], RT_MIN(cbWakeupNotifs, 1024), NULL); 814 ASMAtomicSubU64(&pThis->cbWakeupNotifs, cbRead); 833 815 } 834 816
Note:
See TracChangeset
for help on using the changeset viewer.