Changeset 247 for trunk/wifidog/src/ping_thread.c
- Timestamp:
- 10/22/04 21:52:20 (9 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog/src/ping_thread.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/src/ping_thread.c
r239 r247 93 93 t_auth_serv *auth_server; 94 94 char request[MAX_BUF]; 95 struct hostent *he;95 struct in_addr *h_addr; 96 96 struct sockaddr_in their_addr; 97 97 … … 108 108 auth_server->authserv_hostname); 109 109 110 if ((h e =gethostbyname(auth_server->authserv_hostname)) == NULL) {110 if ((h_addr = wd_gethostbyname(auth_server->authserv_hostname)) == NULL) { 111 111 debug(LOG_ERR, "Failed to resolve %s via gethostbyname" 112 112 "(): %s", auth_server->authserv_hostname, … … 120 120 their_addr.sin_family = AF_INET; 121 121 their_addr.sin_port = htons(auth_server->authserv_http_port); 122 their_addr.sin_addr = * ((struct in_addr *)he->h_addr);122 their_addr.sin_addr = *h_addr; 123 123 memset(&(their_addr.sin_zero), '\0', sizeof(their_addr.sin_zero)); 124 124 … … 133 133 mark_auth_server_bad(auth_server); 134 134 close(sockfd); 135 free(h_addr); 135 136 return; 136 137 } 138 free(h_addr); 137 139 138 140 snprintf(request, sizeof(request) - 1, "GET %sping/?gw_id=%s HTTP/1.0\n"
