Changeset 7041 for trunk/src/wsock32/asyncapi.cpp
- Timestamp:
- Oct 13, 2001, 8:51:08 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/asyncapi.cpp
r6253 r7041 1 /* $Id: asyncapi.cpp,v 1.1 5 2001-07-08 15:44:27 achimhaExp $ */1 /* $Id: asyncapi.cpp,v 1.16 2001-10-13 18:51:07 sandervl Exp $ */ 2 2 3 3 /* … … 415 415 { 416 416 dprintf(("AsyncSelectNotifyEvent: notifying event semaphore, socket: 0x%x, HEVENT: 0x%x, event: 0x%x", pThreadParm->u.asyncselect.s, pThreadParm->notifyHandle, event)); 417 pThreadParm->u.asyncselect.lLastEvent |= event; 417 418 SetEvent(pThreadParm->notifyHandle); 418 419 } … … 442 443 443 444 //break if user cancelled request 444 if(pThreadParm->u.asyncselect.lEvents == 0 ) {445 if(pThreadParm->u.asyncselect.lEvents == 0 || pThreadParm->fCancelled) { 445 446 break; 446 447 } … … 700 701 pThreadParm->u.asyncselect.lEvents = lEventMask; 701 702 pThreadParm->u.asyncselect.lEventsPending = lEventMask; 703 pThreadParm->u.asyncselect.lLastEvent = 0; 702 704 pThreadParm->u.asyncselect.s = s; 703 705 pThreadParm->u.asyncselect.asyncSem = new VSemaphore; … … 734 736 lpEvent->iErrorCode[i] = 0; 735 737 } 736 737 lpEvent->lNetworkEvents = pThreadInfo->u.asyncselect.lEventsPending; 738 739 // TODO is this correct? API says they're cleared 740 pThreadInfo->u.asyncselect.lEventsPending = 0; 741 } else 738 lpEvent->lNetworkEvents = InterlockedExchange((LPLONG)&pThreadInfo->u.asyncselect.lLastEvent, 0); 739 } 740 else 742 741 { 743 742 asyncThreadMutex.leave(); … … 747 746 return SOCKET_ERROR; 748 747 } 748 asyncThreadMutex.leave(); 749 749 750 750 // reset event semaphore if present … … 755 755 } 756 756 757 asyncThreadMutex.leave();758 759 757 WSASetLastError(NO_ERROR); 760 758 return NO_ERROR;
Note:
See TracChangeset
for help on using the changeset viewer.