diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-03-24 11:01:02 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-03-24 11:01:02 +0000 | 
| commit | 58a1449166ebc9c2913bf47a4bf05c4cf3e258b0 (patch) | |
| tree | 7a1b5a119ed3b7aa0f421eddb6edb9f74d76efbf | |
| parent | fcd5003bd6c10f176f63df459e8ca479c5292dc1 (diff) | |
Fixed a broken check in lib/proxy.c, this restores proxy support. Thanks
to Miles Bader for reporting this in the Debian BTS. Apparently not many
people use this functionality, it was broken in bzr for more than a year
already...
| -rw-r--r-- | debian/changelog | 1 | ||||
| -rw-r--r-- | lib/proxy.c | 4 | 
2 files changed, 3 insertions, 2 deletions
| diff --git a/debian/changelog b/debian/changelog index 0eb05525..6c725964 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@  bitlbee (1.2-2) unstable; urgency=low    * Fixed some packaging issues reported by IRC and e-mail. (Closes: #472373) +  * Fixed proxy support. (Closes: #472395)    * Not ready yet.   -- Wilmer van der Gaast <wilmer@gaast.net>  Sun, 23 Mar 2008 21:51:57 +0000 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); | 
