projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn server_proxy_connection_adder() into a nop if the client didn't request keep...
[privoxy.git]
/
jbsockets.c
diff --git
a/jbsockets.c
b/jbsockets.c
index
2e65cc3
..
1133708
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1,4
+1,4
@@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.5
7 2009/05/19 17:18:52
fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.5
9 2009/05/25 15:43:34
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@
-95,10
+95,8
@@
const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.57 2009/05/19 17:18:52 fabian
#include "project.h"
#include "project.h"
-#ifdef FEATURE_PTHREAD
+/* For mutex semaphores only */
#include "jcc.h"
#include "jcc.h"
-/* jcc.h is for mutex semaphores only */
-#endif /* def FEATURE_PTHREAD */
#include "jbsockets.h"
#include "filters.h"
#include "jbsockets.h"
#include "filters.h"
@@
-310,7
+308,7
@@
jb_socket connect_to(const char *host, int portnum, struct client_state *csp)
freeaddrinfo(result);
if (!rp)
{
freeaddrinfo(result);
if (!rp)
{
- log_error(LOG_LEVEL_
INFO
, "Could not connect to [%s]:%s.",
+ log_error(LOG_LEVEL_
CONNECT
, "Could not connect to [%s]:%s.",
host, service);
return(JB_INVALID_SOCKET);
}
host, service);
return(JB_INVALID_SOCKET);
}
@@
-947,7
+945,7
@@
void get_host_information(jb_socket afd, char **ip_address, char **hostname)
{
host = NULL;
}
{
host = NULL;
}
-#elif
FEATURE_PTHREAD
+#elif
def MUTEX_LOCKS_AVAILABLE
privoxy_mutex_lock(&resolver_mutex);
host = gethostbyaddr((const char *)&server.sin_addr,
sizeof(server.sin_addr), AF_INET);
privoxy_mutex_lock(&resolver_mutex);
host = gethostbyaddr((const char *)&server.sin_addr,
sizeof(server.sin_addr), AF_INET);
@@
-1113,7
+1111,7
@@
unsigned long resolve_hostname_to_ip(const char *host)
{
hostp = NULL;
}
{
hostp = NULL;
}
-#elif
FEATURE_PTHREAD
+#elif
def MUTEX_LOCKS_AVAILABLE
privoxy_mutex_lock(&resolver_mutex);
while (NULL == (hostp = gethostbyname(host))
&& (h_errno == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))
privoxy_mutex_lock(&resolver_mutex);
while (NULL == (hostp = gethostbyname(host))
&& (h_errno == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))