Changeset 10428 for trunk/src/wsock32


Ignore:
Timestamp:
Jan 30, 2004, 11:02:12 PM (22 years ago)
Author:
bird
Message:

#682: Test for DEBUG_LOGGING not DEBUG. dprintf may be used in release.

Location:
trunk/src/wsock32
Files:
2 edited

Legend:

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

    r7992 r10428  
    1 /* $Id: asyncapi.cpp,v 1.20 2002-02-23 16:39:09 sandervl Exp $ */
     1/* $Id: asyncapi.cpp,v 1.21 2004-01-30 22:02:11 bird Exp $ */
    22
    33/*
     
    407407    ULONG eventReply = WSAMAKESELECTREPLY(event, socket_error);
    408408
    409 #ifdef DEBUG
     409#ifdef DEBUG_LOGGING
    410410    char *pszEvent = NULL;
    411411
     
    576576
    577577                //Don't send FD_CONNECT is socket was already connected (accept returns connected socket)
    578                 if(!pThreadParm->fConnected && (lEventsPending & FD_CONNECT)) 
     578                if(!pThreadParm->fConnected && (lEventsPending & FD_CONNECT))
    579579                {
    580580                        if(state & SS_ISCONNECTED) {
     
    636636                }
    637637                else
    638                 if((lEventsPending & FD_CLOSE) && (state == 0 && bytesread == 0)) 
     638                if((lEventsPending & FD_CLOSE) && (state == 0 && bytesread == 0))
    639639                {
    640640                        state = ioctl(s, FIOBSTATUS, (char *)&tmp, sizeof(tmp));
    641641
    642                         //Have to make sure this doesn't generates FD_CLOSE 
    643                         //messages when the connection is just fine (recv 
     642                        //Have to make sure this doesn't generates FD_CLOSE
     643                        //messages when the connection is just fine (recv
    644644                        //executed in another thread when select returns)
    645645                        if(state & (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTING|SS_ISDISCONNECTED)) {
     
    694694        strcat(tmpbuf, " FD_WRITE");
    695695    if (lEventMask & FD_OOB)
    696         strcat(tmpbuf, " FD_OOB");   
     696        strcat(tmpbuf, " FD_OOB");
    697697    if (lEventMask & FD_ACCEPT)
    698698        strcat(tmpbuf, " FD_ACCEPT");
     
    809809        // return our internal event bit representation
    810810        lpEvent->lNetworkEvents = InterlockedExchange((LPLONG)&pThreadInfo->u.asyncselect.lLastEvent, 0);
    811    } 
     811   }
    812812   else
    813813   {
  • trunk/src/wsock32/asyncthread.cpp

    r9627 r10428  
    1 /* $Id: asyncthread.cpp,v 1.16 2003-01-06 13:05:40 sandervl Exp $ */
     1/* $Id: asyncthread.cpp,v 1.17 2004-01-30 22:02:12 bird Exp $ */
    22
    33/*
     
    3333{
    3434 PASYNCTHREADPARM pThreadParm = (PASYNCTHREADPARM)arg;
    35 #ifdef DEBUG
     35#ifdef DEBUG_LOGGING
    3636 ULONG ulSocket    = pThreadParm->u.asyncselect.s;
    3737 ULONG hTaskHandle = pThreadParm->hAsyncTaskHandle;
     
    113113                DebugInt3();
    114114        }
    115    }   
     115   }
    116116   memset(pThreadParm, 0, sizeof(*pThreadParm));
    117117   asyncThreadMutex.leave();
     
    220220
    221221   while(pThreadInfo) {
    222         dprintf(( "SOCKET %08xh thread#%d events %xh pending %xh, select %d", 
     222        dprintf(( "SOCKET %08xh thread#%d events %xh pending %xh, select %d",
    223223                pThreadInfo->u.asyncselect.s,
    224224                pThreadInfo->hAsyncTaskHandle,
     
    255255   asyncThreadMutex.enter();
    256256   pThreadInfo = FindAsyncEvent(s);
    257    if(pThreadInfo) 
     257   if(pThreadInfo)
    258258   {
    259259        int size, state, tmp;
     
    309309//******************************************************************************
    310310//******************************************************************************
    311 BOOL QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData, 
     311BOOL QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData,
    312312                     ULONG *plEvent)
    313313{
Note: See TracChangeset for help on using the changeset viewer.