diff options
author | Emmanuel Bouthenot <kolter@openics.org> | 2005-08-03 19:18:28 +0000 |
---|---|---|
committer | Emmanuel Bouthenot <kolter@openics.org> | 2005-08-03 19:18:28 +0000 |
commit | 428cfbc297ef6d964dc5480caaa1c6fd2f8aa294 (patch) | |
tree | 2a2a847cdf305c01c4e3a366707a6b4cadf6e4e0 | |
parent | 02cd829c4c9972d8c2897bdc83a1a5037ea7371d (diff) | |
download | weechat-428cfbc297ef6d964dc5480caaa1c6fd2f8aa294.zip |
fix an error in socket() while using ipv6 proxy
-rw-r--r-- | src/irc/irc-server.c | 5 | ||||
-rw-r--r-- | weechat/src/irc/irc-server.c | 5 |
2 files changed, 8 insertions, 2 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); diff --git a/weechat/src/irc/irc-server.c b/weechat/src/irc/irc-server.c index b2922018a..fabee4213 100644 --- a/weechat/src/irc/irc-server.c +++ b/weechat/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); |