ssld: do not shadow openssl-internal symbol "ssl_ok" (yeah, i know)

This commit is contained in:
William Pitcock 2016-03-19 00:58:15 -05:00
parent 1533b40304
commit d5ff7a9c3c

View file

@ -153,7 +153,7 @@ static void conn_plain_read_cb(rb_fde_t *fd, void *data);
static void conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data); static void conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data);
static void mod_cmd_write_queue(mod_ctl_t * ctl, const void *data, size_t len); static void mod_cmd_write_queue(mod_ctl_t * ctl, const void *data, size_t len);
static const char *remote_closed = "Remote host closed the connection"; static const char *remote_closed = "Remote host closed the connection";
static int ssl_ok; static int ssld_ssl_ok;
static int certfp_method = RB_SSL_CERTFP_METH_SHA1; static int certfp_method = RB_SSL_CERTFP_METH_SHA1;
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
static int zlib_ok = 1; static int zlib_ok = 1;
@ -1006,7 +1006,7 @@ mod_process_cmd_recv(mod_ctl_t * ctl)
break; break;
} }
if(!ssl_ok) if(!ssld_ssl_ok)
{ {
send_nossl_support(ctl, ctl_buf); send_nossl_support(ctl, ctl_buf);
break; break;
@ -1022,7 +1022,7 @@ mod_process_cmd_recv(mod_ctl_t * ctl)
break; break;
} }
if(!ssl_ok) if(!ssld_ssl_ok)
{ {
send_nossl_support(ctl, ctl_buf); send_nossl_support(ctl, ctl_buf);
break; break;
@ -1042,7 +1042,7 @@ mod_process_cmd_recv(mod_ctl_t * ctl)
} }
case 'K': case 'K':
{ {
if(!ssl_ok) if(!ssld_ssl_ok)
{ {
send_nossl_support(ctl, ctl_buf); send_nossl_support(ctl, ctl_buf);
break; break;
@ -1229,7 +1229,7 @@ main(int argc, char **argv)
setup_signals(); setup_signals();
rb_lib_init(NULL, NULL, NULL, 0, maxfd, 1024, 4096); rb_lib_init(NULL, NULL, NULL, 0, maxfd, 1024, 4096);
rb_init_rawbuffers(1024); rb_init_rawbuffers(1024);
ssl_ok = rb_supports_ssl(); ssld_ssl_ok = rb_supports_ssl();
mod_ctl = rb_malloc(sizeof(mod_ctl_t)); mod_ctl = rb_malloc(sizeof(mod_ctl_t));
mod_ctl->F = rb_open(ctlfd, RB_FD_SOCKET, "ircd control socket"); mod_ctl->F = rb_open(ctlfd, RB_FD_SOCKET, "ircd control socket");
mod_ctl->F_pipe = rb_open(pipefd, RB_FD_PIPE, "ircd pipe"); mod_ctl->F_pipe = rb_open(pipefd, RB_FD_PIPE, "ircd pipe");
@ -1239,7 +1239,7 @@ main(int argc, char **argv)
rb_event_add("check_handshake_flood", check_handshake_flood, NULL, 10); rb_event_add("check_handshake_flood", check_handshake_flood, NULL, 10);
read_pipe_ctl(mod_ctl->F_pipe, NULL); read_pipe_ctl(mod_ctl->F_pipe, NULL);
mod_read_ctl(mod_ctl->F, mod_ctl); mod_read_ctl(mod_ctl->F, mod_ctl);
if(!zlib_ok && !ssl_ok) if(!zlib_ok && !ssld_ssl_ok)
{ {
/* this is really useless... */ /* this is really useless... */
send_i_am_useless(mod_ctl); send_i_am_useless(mod_ctl);
@ -1250,7 +1250,7 @@ main(int argc, char **argv)
if(!zlib_ok) if(!zlib_ok)
send_nozlib_support(mod_ctl, NULL); send_nozlib_support(mod_ctl, NULL);
if(!ssl_ok) if(!ssld_ssl_ok)
send_nossl_support(mod_ctl, NULL); send_nossl_support(mod_ctl, NULL);
rb_lib_loop(0); rb_lib_loop(0);
return 0; return 0;