summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-03-26 19:29:37 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-03-26 19:29:37 +0100
commit2bbc2283812aa066f80cb045380fb599443d9e37 (patch)
treec75f1244ba5dad415eb6ac98b260964d28127e52
parentb9e65ec63d3020251d34ed79a4fb8868d8b7e2be (diff)
downloadweechat-2bbc2283812aa066f80cb045380fb599443d9e37.zip
Fix compilation of irc plugin with old gcc (remove #ifdef inside call of macro)
Compilation failed with gcc 3.2.3.
-rw-r--r--src/plugins/irc/irc-server.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 8a1730c27..de3101177 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2777,29 +2777,33 @@ irc_server_connect (struct t_irc_server *server)
weechat_prefix ("error"), IRC_PLUGIN_NAME);
}
- /* init SSL if asked */
+ /* init SSL if asked and connect */
server->ssl_connected = 0;
#ifdef HAVE_GNUTLS
if (IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_SSL))
server->ssl_connected = 1;
-#endif
-
-
server->hook_connect = weechat_hook_connect (proxy,
server->addresses_array[server->index_current_address],
server->ports_array[server->index_current_address],
server->sock,
IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_IPV6),
-#ifdef HAVE_GNUTLS
(server->ssl_connected) ? &server->gnutls_sess : NULL,
(server->ssl_connected) ? irc_server_gnutls_callback : NULL,
IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_SSL_DHKEY_SIZE),
+ IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_LOCAL_HOSTNAME),
+ &irc_server_connect_cb,
+ server);
#else
+ server->hook_connect = weechat_hook_connect (proxy,
+ server->addresses_array[server->index_current_address],
+ server->ports_array[server->index_current_address],
+ server->sock,
+ IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_IPV6),
NULL, NULL, 0,
-#endif
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_LOCAL_HOSTNAME),
&irc_server_connect_cb,
server);
+#endif
/* send signal "irc_server_connecting" with server name */
weechat_hook_signal_send ("irc_server_connecting",