Ignore:
Timestamp:
Nov 9, 2000, 7:12:49 PM (25 years ago)
Author:
sandervl
Message:

AH: WINSOCK_DeleteIData fix

File:
1 edited

Legend:

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

    r3548 r4571  
    1 /* $Id: wsock32.cpp,v 1.32 2000-05-18 09:09:04 sandervl Exp $ */
     1/* $Id: wsock32.cpp,v 1.33 2000-11-09 18:12:49 sandervl Exp $ */
    22
    33/*
     
    122122void WINSOCK_DeleteIData(void)
    123123{
    124     LPWSINFO ppid, iData;
    125 
     124    LPWSINFO iData = WINSOCK_GetIData();
     125    LPWSINFO* ppid;
    126126    if (iData) {
    127         ppid = lpFirstIData;
    128         while(ppid)
    129         {
    130                 iData = ppid;
    131                 ppid  = ppid->lpNextIData;
    132 
    133                 if( iData->flags & WSI_BLOCKINGCALL )
    134                         dprintf(("\tinside blocking call!\n"));
    135 
    136                 /* delete scratch buffers */
    137 
    138                 if(iData->he)   free(iData->he);
    139                 if(iData->se)   free(iData->se);
    140                 if(iData->pe)   free(iData->pe);
     127        for (ppid = &lpFirstIData; *ppid; ppid = &(*ppid)->lpNextIData) {
     128            if (*ppid == iData) {
     129                *ppid = iData->lpNextIData;
     130                break;
     131            }
     132        }
     133
     134        if( iData->flags & WSI_BLOCKINGCALL )
     135                dprintf(("\tinside blocking call!\n"));
     136
     137        /* delete scratch buffers */
     138        if(iData->he)   free(iData->he);
     139        if(iData->se)   free(iData->se);
     140        if(iData->pe)   free(iData->pe);
    141141
    142142        ////    if( iData->buffer ) SEGPTR_FREE(iData->buffer);
    143143        ////    if( iData->dbuffer ) SEGPTR_FREE(iData->dbuffer);
    144144
    145                 HeapFree(GetProcessHeap(), 0, iData);
    146         }
     145        HeapFree(GetProcessHeap(), 0, iData);
    147146    }
    148147}
Note: See TracChangeset for help on using the changeset viewer.