diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 15:28:23 +0200 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 15:28:23 +0200 | 
| commit | dd345753c1742905c9f81aa71d8b09109fbc5456 (patch) | |
| tree | 8689e25f6465c17c3dd5913af6ae289bf13768d4 /lib/proxy.c | |
| parent | 0db75ad966458610427dacdd31ecbaddbca18935 (diff) | |
| parent | fa75134008bd9206ca02380927c27581feb65c3e (diff) | |
merge trunk.
Diffstat (limited to 'lib/proxy.c')
| -rw-r--r-- | lib/proxy.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/lib/proxy.c b/lib/proxy.c index 0e1c8f07..53b89d64 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -529,7 +529,7 @@ int proxy_connect(const char *host, int port, b_event_handler func, gpointer dat  {  	struct PHB *phb; -	if (!host || !port || (port == -1) || !func || strlen(host) > 128) { +	if (!host || port <= 0 || !func || strlen(host) > 128) {  		return -1;  	} @@ -537,7 +537,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) || strlen(proxyhost) > 0 || !proxyport || (proxyport == -1)) +	if (proxytype == PROXY_NONE || !proxyhost[0] || proxyport <= 0)  		return proxy_connect_none(host, port, phb);  	else if (proxytype == PROXY_HTTP)  		return proxy_connect_http(host, port, phb); | 
