Ignore:
Timestamp:
Mar 24, 2000, 8:22:51 PM (25 years ago)
Author:
sandervl
Message:

fixes

File:
1 edited

Legend:

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

    r3210 r3226  
    1 /* $Id: asyncapi.cpp,v 1.3 2000-03-23 23:07:22 sandervl Exp $ */
     1/* $Id: asyncapi.cpp,v 1.4 2000-03-24 19:22:51 sandervl Exp $ */
    22
    33/*
     
    3434
    3535//******************************************************************************
     36//NOTE: Must execute RemoveFromQueue before returning
    3637//******************************************************************************
    3738void ASYNCCNV WSAsyncThreadProc(void *pparm)
     
    7576                        }
    7677                }
    77                 else    fail = WSANO_DATA;
     78                else    fail = wsaHerrno();
    7879                break;
    7980        }
     
    154155                     (WPARAM)pThreadParm->hAsyncTaskHandle, lParam);
    155156   }
     157   pThreadParm->fActive = FALSE;
     158   RemoveFromQueue(pThreadParm);
    156159}
    157160//******************************************************************************
     
    404407#define  nr(i)          ((i != -1) ? 1 : 0)
    405408#define  ready(i)       ((i != -1) && (sockets[i] != -1))
     409//NOTE: Must execute RemoveFromQueue before returning
    406410//******************************************************************************
    407411void ASYNCCNV WSAsyncSelectThreadProc(void *pparm)
     
    451455        }
    452456
    453 //        dprintf(("WSAsyncSelectThreadProc %x rds=%d, wrs=%d, oos =%d, pending = %x", pThreadParm->u.asyncselect.s, noread, nowrite, noexcept, lEventsPending));
     457////        dprintf(("WSAsyncSelectThreadProc %x rds=%d, wrs=%d, oos =%d, pending = %x", pThreadParm->u.asyncselect.s, noread, nowrite, noexcept, lEventsPending));
    454458
    455459        ret = select((int *)sockets, nr(noread), nr(nowrite), nr(noexcept), -1);
     
    496500                                ret = getsockopt(s, SOL_SOCKET, SO_ERROR,
    497501                                                 (char *) &sockoptval, &sockoptlen);
    498                                 if(sockoptval == WSAECONNREFUSED) {
     502                                //SvL: WSeB returns SOCECONNREFUSED, Warp 4 0x3d
     503                                if(sockoptval == SOCECONNREFUSED || sockoptval == (SOCECONNREFUSED - SOCBASEERR)) {
    499504                                        AsyncNotifyEvent(pThreadParm, FD_CONNECT, WSAECONNREFUSED);
    500505                                }
     
    553558        }
    554559   }
     560   //remove it first, then delete semaphore object
     561   pThreadParm->fActive = FALSE;
     562   RemoveFromQueue(pThreadParm);
    555563   delete pThreadParm->u.asyncselect.asyncSem;
     564   pThreadParm->u.asyncselect.asyncSem = 0;
    556565}
    557566//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.