X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jbsockets.c;h=b234b2059a13e1f2c1f2e699d240325e26f27de4;hb=c91030cd0e6ee51e83547233ee3d94ae0a32eceb;hp=5de9a54bef0dc52960560310157a79ac677f2f4c;hpb=52feb95cca9309b54829313054d8f4befabbd028;p=privoxy.git diff --git a/jbsockets.c b/jbsockets.c index 5de9a54b..b234b205 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.70 2009/12/15 17:51:14 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.72 2010/02/15 15:14:10 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -176,6 +176,8 @@ jb_socket connect_to(const char *host, int portnum, struct client_state *csp) { 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); } @@ -1207,9 +1209,9 @@ unsigned long resolve_hostname_to_ip(const char *host) #ifdef FEATURE_CONNECTION_KEEP_ALIVE /********************************************************************* * - * Function : socket_is_still_usable + * Function : socket_is_still_alive * - * Description : Decides whether or not an open socket is still usable. + * Description : Figures out whether or not a socket is still alive. * * Parameters : * 1 : sfd = The socket to check. @@ -1217,7 +1219,7 @@ unsigned long resolve_hostname_to_ip(const char *host) * Returns : TRUE for yes, otherwise FALSE. * *********************************************************************/ -int socket_is_still_usable(jb_socket sfd) +int socket_is_still_alive(jb_socket sfd) { char buf[10]; int no_data_waiting;