Changeset 44469 in vbox for trunk/src/VBox/Runtime/r3/socket.cpp
- Timestamp:
- Jan 30, 2013 3:37:55 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83477
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/socket.cpp
r44429 r44469 1770 1770 } 1771 1771 1772 #ifdef RT_OS_WINDOWS1773 1772 1774 1773 /** … … 1779 1778 * @param hSocket The socket handle. 1780 1779 * @param fEvents The events we're polling for. 1781 * @param ph where to put the primary handle.1782 */ 1783 int rtSocketPollGetHandle(RTSOCKET hSocket, uint32_t fEvents, P HANDLE ph)1780 * @param phNative Where to put the primary handle. 1781 */ 1782 int rtSocketPollGetHandle(RTSOCKET hSocket, uint32_t fEvents, PRTHCINTPTR phNative) 1784 1783 { 1785 1784 RTSOCKETINT *pThis = hSocket; 1786 1785 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 1787 1786 AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE); 1787 #ifdef RT_OS_WINDOWS 1788 1788 AssertReturn(rtSocketTryLock(pThis), VERR_CONCURRENT_ACCESS); 1789 1789 1790 1790 int rc = VINF_SUCCESS; 1791 1791 if (pThis->hEvent != WSA_INVALID_EVENT) 1792 *ph = pThis->hEvent; 1793 else 1794 { 1795 *ph = pThis->hEvent = WSACreateEvent(); 1792 *phNative = (RTHCINTPTR)pThis->hEvent; 1793 else 1794 { 1795 pThis->hEvent = WSACreateEvent(); 1796 *phNative = (RTHCINTPTR)pThis->hEvent; 1796 1797 if (pThis->hEvent == WSA_INVALID_EVENT) 1797 1798 rc = rtSocketError(); … … 1800 1801 rtSocketUnlock(pThis); 1801 1802 return rc; 1802 } 1803 1803 1804 #else /* !RT_OS_WINDOWS */ 1805 *phNative = (RTHCUINTPTR)pThis->hNative; 1806 return VINF_SUCCESS; 1807 #endif /* !RT_OS_WINDOWS */ 1808 } 1809 1810 #ifdef RT_OS_WINDOWS 1804 1811 1805 1812 /**
Note:
See TracChangeset
for help on using the changeset viewer.