-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.69 2009/12/15 17:41:36 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.71 2009/12/16 08:35:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
{
log_error(LOG_LEVEL_INFO,
"Can not resolve %s: %s", host, gai_strerror(retval));
+ /* XXX: Should find a better way to propagate this error. */
+ errno = EINVAL;
csp->http->host_ip_addr_str = strdup("unknown");
return(JB_INVALID_SOCKET);
}
#else
do
{
+#if defined(FEATURE_ACCEPT_FILTER) && defined(SO_ACCEPTFILTER)
+ struct accept_filter_arg af_options;
+ bzero(&af_options, sizeof(af_options));
+ strlcpy(af_options.af_name, "httpready", sizeof(af_options.af_name));
+ setsockopt(fd, SOL_SOCKET, SO_ACCEPTFILTER, &af_options, sizeof(af_options));
+#endif
afd = accept (fd, (struct sockaddr *) &client, &c_length);
} while (afd < 1 && errno == EINTR);
if (afd < 0)