Changeset 1943 for trunk/src/wsock32/new/relaywin.cpp
- Timestamp:
- Dec 2, 1999, 5:12:24 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/new/relaywin.cpp
r1942 r1943 1 /* $Id: relaywin.cpp,v 1. 5 1999-12-02 16:01:45achimha Exp $ */1 /* $Id: relaywin.cpp,v 1.6 1999-12-02 16:12:23 achimha Exp $ */ 2 2 3 3 /* … … 216 216 /* we need to convert the hostent structure here */ 217 217 Whostent *WinHostent = (Whostent*)pHM->pvUserData1; 218 hostent *OS2Hostent = (hostent*)pHM->pvUserData2; 219 WinHostent->h_name = OS2Hostent->h_name; 220 WinHostent->h_aliases = OS2Hostent->h_aliases; 221 WinHostent->h_addrtype = (short)OS2Hostent->h_addrtype; 222 WinHostent->h_length = (short)OS2Hostent->h_length; 223 WinHostent->h_addr_list = OS2Hostent->h_addr_list; 224 /* free our temporary OS2 hostent buffer */ 225 //TODO: how can we free this? we will end up with a memory leak :( 226 // this memory block not only contains the hostent structure but also the strings it points to 227 // I think we should copy the strings after the Whostent into the Win32 buffer 228 // free(pHM->pvUserData2); 218 hostent *OS2Hostent = (hostent*)pHM->pvUserData1; 219 short h_addrtype = (short)OS2Hostent->h_addrtype; 220 WinHostent->h_addrtype = h_addrtype; 221 short h_length = (short)OS2Hostent->h_length; 222 WinHostent->h_length = h_length; 223 char **h_addr_list = OS2Hostent->h_addr_list; 224 WinHostent->h_addr_list = h_addr_list; 229 225 //TODO: the size of OS/2 hostent is 4 bytes bigger so the original buffer *might* be too small 230 226
Note:
See TracChangeset
for help on using the changeset viewer.