diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/misc.c | 2 | ||||
| -rw-r--r-- | lib/proxy.c | 4 | 
2 files changed, 2 insertions, 4 deletions
| @@ -321,7 +321,6 @@ char *strip_newlines( char *source )  	return source;  } -#ifdef IPV6  /* Wrap an IPv4 address into IPv6 space. Not thread-safe... */  char *ipv6_wrap( char *src )  { @@ -359,7 +358,6 @@ char *ipv6_unwrap( char *src )  	return ( src + 7 );  } -#endif  /* Convert from one charset to another. diff --git a/lib/proxy.c b/lib/proxy.c index 7911b06f..dff5d0a4 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -210,7 +210,7 @@ static gboolean http_canwrite(gpointer data, gint source, b_input_condition cond  		return FALSE;  	} -	if (proxyuser && *proxyuser) { +	if (strlen(proxyuser) > 0) {  		char *t1, *t2;  		t1 = g_strdup_printf("%s:%s", proxyuser, proxypass);  		t2 = tobase64(t1); @@ -538,7 +538,7 @@ int proxy_connect(const char *host, int port, b_event_handler func, gpointer dat  	phb->func = func;  	phb->data = data; -	if ((proxytype == PROXY_NONE) || !proxyhost || !proxyhost[0] || !proxyport || (proxyport == -1)) +	if ((proxytype == PROXY_NONE) || strlen(proxyhost) > 0 || !proxyport || (proxyport == -1))  		return proxy_connect_none(host, port, phb);  	else if (proxytype == PROXY_HTTP)  		return proxy_connect_http(host, port, phb); | 
