aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-11-05 22:59:49 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-11-05 22:59:49 +0000
commit22313024f80f7325a7253c64fe49cc6458df7dd4 (patch)
treee69df7f5f460cfe0163a54543f2c96eb36b6634c /lib
parent5e2615a2d8a5ae64161727f8a32f6f0949f3fee4 (diff)
parent7435ccf486eee2f60d6a8b2ab0029b8f4ce17ab7 (diff)
Merging from Jelmer.
Diffstat (limited to 'lib')
-rw-r--r--lib/misc.c2
-rw-r--r--lib/proxy.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/misc.c b/lib/misc.c
index 5e385d4a..c977029f 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -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);