-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.83 2011/03/27 13:53:25 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.84 2011/03/27 13:53:49 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
return(JB_INVALID_SOCKET);
}
+ csp->http->host_ip_addr_str = malloc(NI_MAXHOST);
+ if (NULL == csp->http->host_ip_addr_str)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Out of memory while getting the server IP address.");
+ return JB_INVALID_SOCKET;
+ }
+
for (rp = result; rp != NULL; rp = rp->ai_next)
{
}
#endif /* def FEATURE_ACL */
- csp->http->host_ip_addr_str = malloc(NI_MAXHOST);
- if (NULL == csp->http->host_ip_addr_str)
- {
- log_error(LOG_LEVEL_ERROR,
- "Out of memory while getting the server IP address.");
- return JB_INVALID_SOCKET;
- }
retval = getnameinfo(rp->ai_addr, rp->ai_addrlen,
csp->http->host_ip_addr_str, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (retval)
log_error(LOG_LEVEL_ERROR,
"Can not save csp->http->host_ip_addr_str: %s",
gai_strerror(retval));
- freez(csp->http->host_ip_addr_str);
continue;
}