Ignore:
Timestamp:
Dec 2, 1999, 4:22:05 PM (26 years ago)
Author:
achimha
Message:

async wsock fixes

File:
1 edited

Legend:

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

    r1934 r1940  
    1 /* $Id: wsock32.cpp,v 1.8 1999-12-02 07:58:54 phaller Exp $ */
     1/* $Id: wsock32.cpp,v 1.9 1999-12-02 15:22:05 achimha Exp $ */
    22
    33/*
     
    6363static WSOCKTHREADDATA wstdFallthru; // for emergency only
    6464
     65static HWND hwndRelay; // handle to our relay window
    6566
    6667/*****************************************************************************
     
    12681269              int,buflen)
    12691270{
    1270   return(WSAAsyncGetHostByName(hWnd,
    1271                                wMsg,
    1272                                name,
    1273                                buf,
    1274                                buflen));
     1271  int   rc;
     1272  HWND  hwndOS2 = Win32ToOS2Handle(hWnd);
     1273  ULONG ulNewID;
     1274  char *OS2Hostent = (char*)malloc(MAXGETHOSTSTRUCT);
     1275
     1276  if (hwndRelay == NULL) // already initialized ?
     1277    hwndRelay = RelayInitialize(hwndOS2);
     1278
     1279  // TODO: Is this the original behaviour?
     1280  if ((name == NULL) || (buf == NULL))
     1281  {
     1282    // remove entry from list
     1283    RelayFreeByHwnd(hWnd);
     1284  }
     1285  else
     1286    // add entry to list, we need to store both our temp buffer and the apps buffer
     1287    ulNewID = RelayAlloc(hWnd, wMsg, ASYNCREQUEST_GETHOSTBYNAME, buf, OS2Hostent);
     1288
     1289  // call pmwsock function, will fill our temp buffer
     1290  rc = WSAAsyncGetHostByName(hwndRelay,
     1291                             ulNewID,
     1292                             name,
     1293                             OS2Hostent,
     1294                             buflen);
     1295
     1296  return rc;
    12751297}
    12761298
     
    13491371  ULONG ulNewID;
    13501372
    1351   static HWND hwndRelay; // handle to our relay window
    1352 
    13531373  if (hwndRelay == NULL) // already initialized ?
    13541374    hwndRelay = RelayInitialize(hwndOS2);
     
    13801400  else
    13811401    // add entry to list
    1382     ulNewID = RelayAlloc(hWnd, wMsg);
     1402    ulNewID = RelayAlloc(hWnd, wMsg, ASYNCREQUEST_SELECT);
    13831403
    13841404  rc = WSAAsyncSelect(s,
Note: See TracChangeset for help on using the changeset viewer.