Changeset 9340 for trunk/src


Ignore:
Timestamp:
Oct 10, 2002, 6:28:40 PM (23 years ago)
Author:
sandervl
Message:

Overlapped IO bugfixes for synchronization + ip logging fix

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/dbglog.cpp

    r9322 r9340  
    1 /* $Id: dbglog.cpp,v 1.3 2002-10-03 13:05:55 sandervl Exp $ */
     1/* $Id: dbglog.cpp,v 1.4 2002-10-10 16:28:40 sandervl Exp $ */
    22
    33/*
     
    255255static BOOL fFlushLines = FALSE;
    256256
     257static char *pszLastLogEntry = NULL;
     258
    257259//#define CHECK_ODINHEAP
    258260#if defined(DEBUG) && defined(CHECK_ODINHEAP)
     
    287289  va_list argptr;
    288290  TEB *teb = GetThreadTEB();
     291
     292  pszLastLogEntry = tekst;
    289293
    290294  ODIN_HEAPCHECK();
     
    452456        int rc;
    453457
     458        servername.sin_family      = AF_INET;
     459        servername.sin_port        = WIN32_IP_LOG_PORT;
     460
    454461        rc = sendto(logSocket, logbuffer, strlen(logbuffer)+1, 0, (struct sockaddr *)&servername, sizeof(servername));
    455 
     462        if(rc == -1) {
     463            rc = sock_errno();
     464        }
    456465        if(teb) teb->o.odin.logfile = 0;
    457466        va_end(argptr);
  • trunk/src/kernel32/overlappedio.cpp

    r8958 r9340  
    1 /* $Id: overlappedio.cpp,v 1.19 2002-08-04 15:26:52 sandervl Exp $ */
     1/* $Id: overlappedio.cpp,v 1.20 2002-10-10 16:28:40 sandervl Exp $ */
    22
    33/*
     
    388388    else index = ASYNC_INDEX_WRITE;
    389389
    390     addRequest(index, lpRequest);
    391 
    392390    lpOverlapped->Internal     = STATUS_PENDING;
    393391    lpOverlapped->InternalHigh = 0;
    394392    //reset overlapped semaphore to non-signalled
    395393    ::ResetEvent(lpOverlapped->hEvent);
     394
     395    //Add request to queue; must make sure we do this right before waking the async thread
     396    addRequest(index, lpRequest);
    396397
    397398    //wake up async thread
     
    437438    lpRequest->next                = NULL;
    438439
    439     addRequest(ASYNC_INDEX_READ, lpRequest);
    440 
    441440    lpOverlapped->Internal     = STATUS_PENDING;
    442441    lpOverlapped->InternalHigh = 0;
    443442    //reset overlapped semaphore to non-signalled
    444443    ::ResetEvent(lpOverlapped->hEvent);
     444
     445    //Add request to queue; must make sure we do this right before waking the async thread
     446    addRequest(ASYNC_INDEX_READ, lpRequest);
    445447
    446448    //wake up async thread
     
    514516    }
    515517
     518    //add request to list; must make sure we do this right before waking the async thread
    516519    addRequest(ASYNC_INDEX_POLL, lpRequest);
    517520
Note: See TracChangeset for help on using the changeset viewer.