Changeset 254 in Main for 2.03E/Server/server.c
- Timestamp:
- Oct 4, 2024, 1:08:33 PM (6 weeks ago)
- Location:
- 2.03E
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
2.03E/Server/server.c
r253 r254 34 34 35 35 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 36 #ifndef NO_GET ADDRINFO36 #ifndef NO_GETNAMEINFO 37 37 #include <ws2tcpip.h> 38 38 #include <wspiapi.h> … … 64 64 #include <netinet/tcp.h> 65 65 #endif 66 #ifndef NO_GET ADDRINFO66 #ifndef NO_GETNAMEINFO 67 67 #include <netdb.h> 68 68 #endif … … 78 78 79 79 #ifndef S_ISDIR 80 #define S_ISDIR(x) ((x) &_S_IFDIR)80 #define S_ISDIR(x) ((x)&_S_IFDIR) 81 81 #endif 82 82 … … 494 494 struct tw_http_response res; 495 495 struct tw_tool tools; 496 #ifndef NO_GETADDRINFO 496 char* addrstr; 497 #ifndef NO_GETNAMEINFO 497 498 struct sockaddr* sa = (struct sockaddr*)&addr; 498 499 getnameinfo(sa, sizeof(addr), address, 512, NULL, 0, NI_NUMERICHOST); 499 500 #endif 500 address[0] = 0; 501 addrstr = inet_ntoa(addr.sin_addr); 502 strcpy(address, addrstr); 503 address[strlen(addrstr)] = 0; 501 504 #ifdef FREE_PTR 502 505 free(ptr); … … 1050 1053 } 1051 1054 } 1052 for(i = 0; i < sockcount; i++) {1055 for(i = 0; i < sockcount; i++) { 1053 1056 close_socket(sockets[i]); 1054 1057 }
Note:
See TracChangeset
for help on using the changeset viewer.