aboutsummaryrefslogtreecommitdiffstats
path: root/lib/proxy.c
diff options
context:
space:
mode:
authorulim <a.sporto+bee@gmail.com>2008-04-14 15:10:53 +0200
committerulim <a.sporto+bee@gmail.com>2008-04-14 15:10:53 +0200
commitb79308b943149d729b1daea8c56cff9fc02711a0 (patch)
treea5f80445ed63d864703941474dc6cf8998df3136 /lib/proxy.c
parent6cac643f6933e431b90fcb937dec505f989e6a53 (diff)
parentaa311173a85020bcbbbf61135a5451e171d422f5 (diff)
merged in upstream r379 (somewhere after 1.2-3).
Just one trivial conflict in the jabber Makefile, went smoothly.
Diffstat (limited to 'lib/proxy.c')
-rw-r--r--lib/proxy.c4
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);