Changeset 7977 for trunk/src


Ignore:
Timestamp:
Feb 20, 2002, 4:07:14 PM (24 years ago)
Author:
sandervl
Message:

accept bugfix for changing async request

Location:
trunk/src/wsock32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wsock32/asyncapi.cpp

    r7146 r7977  
    1 /* $Id: asyncapi.cpp,v 1.18 2001-10-21 13:43:51 sandervl Exp $ */
     1/* $Id: asyncapi.cpp,v 1.19 2002-02-20 15:07:13 sandervl Exp $ */
    22
    33/*
     
    675675//******************************************************************************
    676676//******************************************************************************
    677 int WSAAsyncSelectWorker(SOCKET s, int mode, int notifyHandle, int notifyData, long lEventMask)
     677int WSAAsyncSelectWorker(SOCKET s, int mode, DWORD notifyHandle, DWORD notifyData, DWORD lEventMask)
    678678{
    679679  PASYNCTHREADPARM pThreadParm;
  • trunk/src/wsock32/asyncthread.cpp

    r7146 r7977  
    1 /* $Id: asyncthread.cpp,v 1.13 2001-10-21 13:43:51 sandervl Exp $ */
     1/* $Id: asyncthread.cpp,v 1.14 2002-02-20 15:07:13 sandervl Exp $ */
    22
    33/*
     
    3333{
    3434 PASYNCTHREADPARM pThreadParm = (PASYNCTHREADPARM)arg;
     35#ifdef DEBUG
     36 ULONG ulSocket    = pThreadParm->u.asyncselect.s;
     37 ULONG hTaskHandle = pThreadParm->hAsyncTaskHandle;
     38#endif
    3539
    3640  pThreadParm->asyncProc((PVOID)arg);
     
    4044////    WSASetBlocking(FALSE, pThreadParm->hThread);
    4145
    42   dprintf(("AsyncThread %x socket %x exit", pThreadParm->hAsyncTaskHandle, pThreadParm->u.asyncselect.s));
     46  dprintf(("AsyncThread %x socket %x exit", hTaskHandle, ulSocket));
    4347  free((PVOID)pThreadParm);
    4448}
     
    281285//******************************************************************************
    282286//******************************************************************************
    283 BOOL QueryAsyncEvent(SOCKET s, HWND *pHwnd, int *pMsg, ULONG *plEvent)
     287BOOL QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData,
     288                     ULONG *plEvent)
    284289{
    285290 PASYNCTHREADPARM pThreadInfo;
     
    288293   pThreadInfo = FindAsyncEvent(s);
    289294   if(pThreadInfo) {
    290         *pHwnd   = (HWND)pThreadInfo->notifyHandle;
    291         *pMsg    = pThreadInfo->notifyData;
    292         *plEvent = pThreadInfo->u.asyncselect.lEvents;
     295        *pMode         = pThreadInfo->u.asyncselect.mode;
     296        *pNofityHandle = pThreadInfo->notifyHandle;
     297        *pNofityData   = pThreadInfo->notifyData;
     298        *plEvent       = pThreadInfo->u.asyncselect.lEvents;
    293299   }
    294300   asyncThreadMutex.leave();
  • trunk/src/wsock32/asyncthread.h

    r7140 r7977  
    1 /* $Id: asyncthread.h,v 1.10 2001-10-19 18:34:47 achimha Exp $ */
     1/* $Id: asyncthread.h,v 1.11 2002-02-20 15:07:14 sandervl Exp $ */
    22
    33/*
     
    4040        ASYNCTHREADPROC asyncProc;
    4141        VMutex         *parmmutex;
    42         int             notifyHandle;
    43         int             notifyData;
     42        DWORD           notifyHandle;
     43        DWORD           notifyData;
    4444        LPSTR           buf;
    4545        DWORD           buflen;
     
    8989
    9090void  EnableAsyncEvent(SOCKET s, ULONG flags);
    91 BOOL  QueryAsyncEvent(SOCKET s, HWND *pHwnd, int *pMsg, ULONG *plEvent);
     91BOOL  QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData, ULONG *plEvent);
    9292BOOL  FindAndSetAsyncEvent(SOCKET s, int mode, int notifyHandle, int notifyData, ULONG lEventMask);
    9393
  • trunk/src/wsock32/wsock32.cpp

    r7805 r7977  
    1 /* $Id: wsock32.cpp,v 1.46 2002-02-06 10:33:56 sandervl Exp $ */
     1/* $Id: wsock32.cpp,v 1.47 2002-02-20 15:07:14 sandervl Exp $ */
    22
    33/*
     
    376376   //to blocking mode
    377377   if (cmd == FIONBIO) {
    378         HWND  hwnd;
    379         int   msg;
     378        ULONG ulNotifyHandle, ulNotifyData;
     379        int   mode;
    380380        ULONG lEvent;
    381381
    382         if(QueryAsyncEvent(s, &hwnd, &msg, &lEvent) == TRUE) {
     382        if(QueryAsyncEvent(s, &mode, &ulNotifyHandle, &ulNotifyData, &lEvent) == TRUE)
     383        {
    383384                if(*argp != 0) {
    384385                        //nothing to do; already non-blocking
     
    521522                                int *,            addrlen)
    522523{
    523  int   ret, msg;
    524  HWND  hwnd;
    525  ULONG lEvent;
     524 int   ret, mode;
     525 ULONG lEvent, notifyData, notifyHandle;
    526526
    527527   if(!fWSAInitialized) {
     
    549549        //if this socket has an active async. select pending, then call WSAAsyncSelect
    550550        //with the same parameters for the new socket (see docs)
    551         if(QueryAsyncEvent(s, &hwnd, &msg, &lEvent) == TRUE) {
    552                 if(WSAAsyncSelect(ret, hwnd, msg, lEvent) == SOCKET_ERROR) {
     551        if(QueryAsyncEvent(s, &mode, &notifyHandle, &notifyData, &lEvent) == TRUE) {
     552                if(WSAAsyncSelectWorker(s, mode, notifyHandle, notifyData, lEvent) == SOCKET_ERROR) {
    553553                        ret = SOCKET_ERROR;
    554554                }
     
    948948  struct ws_linger *yy;
    949949  struct linger     xx;
    950   int               ret;
     950  int               ret, val;
    951951  ULONG             size;
    952952  char             *safeoptval;
     
    11591159                   return SOCKET_ERROR;
    11601160               }
    1161                dprintf(("IPPROTO_IP, IP_HDRINCL 0x%x", *optval));
    1162                ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL_OS2, (char *)optval, optlen);
     1161               val = *optval;
     1162               dprintf(("IPPROTO_IP, IP_HDRINCL 0x%x", val));
     1163               ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL_OS2, (char *)&val, optlen);
    11631164               break;
    11641165
  • trunk/src/wsock32/wsock32.h

    r7368 r7977  
    1 /* $Id: wsock32.h,v 1.20 2001-11-16 16:55:20 sandervl Exp $ */
     1/* $Id: wsock32.h,v 1.21 2002-02-20 15:07:14 sandervl Exp $ */
    22
    33/* WSOCK32.H--definitions & conversions for Odin's wsock32.dll.
     
    248248#define WSA_SELECT_HEVENT 2
    249249// async select worker routine
    250 int WSAAsyncSelectWorker(SOCKET s, int mode, int notifyHandle, int notifyData, long lEventMask);
     250int WSAAsyncSelectWorker(SOCKET s, int mode, DWORD notifyHandle, DWORD notifyData, DWORD lEventMask);
    251251
    252252typedef struct _WSANETWORKEVENTS
Note: See TracChangeset for help on using the changeset viewer.