summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Bouthenot <kolter@openics.org>2005-08-03 19:18:28 +0000
committerEmmanuel Bouthenot <kolter@openics.org>2005-08-03 19:18:28 +0000
commit428cfbc297ef6d964dc5480caaa1c6fd2f8aa294 (patch)
tree2a2a847cdf305c01c4e3a366707a6b4cadf6e4e0 /src
parent02cd829c4c9972d8c2897bdc83a1a5037ea7371d (diff)
downloadweechat-428cfbc297ef6d964dc5480caaa1c6fd2f8aa294.zip
fix an error in socket() while using ipv6 proxy
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index b2922018a..fabee4213 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -1426,7 +1426,10 @@ server_connect (t_irc_server *server)
server->child_write = child_pipe[1];
/* create socket and set options */
- server->sock = socket ((server->ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
+ if (cfg_proxy_use)
+ server->sock = socket ((cfg_proxy_ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
+ else
+ server->sock = socket ((server->ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
if (server->sock == -1)
{
irc_display_prefix (server->buffer, PREFIX_ERROR);