- Timestamp:
- Oct 10, 2001, 10:59:23 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/wsock32.cpp
r6992 r6996 1 /* $Id: wsock32.cpp,v 1. 39 2001-10-10 17:20:17 sandervlExp $ */1 /* $Id: wsock32.cpp,v 1.40 2001-10-10 20:59:23 phaller Exp $ */ 2 2 3 3 /* … … 1229 1229 const char *,name) 1230 1230 { 1231 LPWSINFO pwsi = WINSOCK_GetIData(); 1232 1233 if( pwsi ) 1231 LPWSINFO pwsi = WINSOCK_GetIData(); 1232 1233 if( pwsi ) 1234 { 1235 struct hostent* host; 1236 1237 USHORT sel = RestoreOS2FS(); 1238 host = gethostbyname( (char*) name); 1239 SetFS(sel); 1240 1241 if( host != NULL ) 1234 1242 { 1235 struct hostent* host; 1236 if( (host = gethostbyname((char *)name)) != NULL ) { 1237 if( WS_dup_he(pwsi, host) ) { 1238 WSASetLastError(NO_ERROR); 1239 return pwsi->he; 1240 } 1241 else WSASetLastError(WSAENOBUFS); 1242 } 1243 else WSASetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno()); 1243 if( WS_dup_he(pwsi, host) ) 1244 { 1245 WSASetLastError(NO_ERROR); 1246 return pwsi->he; 1247 } 1248 else 1249 WSASetLastError(WSAENOBUFS); 1244 1250 } 1245 else WSASetLastError(WSANOTINITIALISED); 1246 return NULL; 1251 else 1252 WSASetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno()); 1253 } 1254 else 1255 WSASetLastError(WSANOTINITIALISED); 1256 1257 return NULL; 1247 1258 } 1248 1259 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.