Skip to content

Commit

Permalink
Add TLS ifdefs to ssl var initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vanosg committed Nov 5, 2017
1 parent adebebe commit 2190b8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmds.c
Expand Up @@ -872,7 +872,6 @@ static void cmd_pls_bot(struct userrec *u, int idx, char *par)
userlist = adduser(userlist, handle, "none", "-", USER_BOT); userlist = adduser(userlist, handle, "none", "-", USER_BOT);
u1 = get_user_by_handle(userlist, handle); u1 = get_user_by_handle(userlist, handle);
bi = user_malloc(sizeof(struct bot_addr)); bi = user_malloc(sizeof(struct bot_addr));
bi->ssl = 0;
bi->address = user_malloc(strlen(addr) + 1); bi->address = user_malloc(strlen(addr) + 1);
strcpy(bi->address, addr); strcpy(bi->address, addr);


Expand All @@ -881,6 +880,7 @@ static void cmd_pls_bot(struct userrec *u, int idx, char *par)
bi->relay_port = 3333; bi->relay_port = 3333;
} else { } else {
#ifdef TLS #ifdef TLS
bi->ssl = 0;
if (*port == '+') if (*port == '+')
bi->ssl |= TLS_BOT; bi->ssl |= TLS_BOT;
#endif #endif
Expand Down
2 changes: 2 additions & 0 deletions src/tcluser.c
Expand Up @@ -309,7 +309,9 @@ static int tcl_addbot STDVAR
else { else {
userlist = adduser(userlist, argv[1], "none", "-", USER_BOT); userlist = adduser(userlist, argv[1], "none", "-", USER_BOT);
bi = user_malloc(sizeof(struct bot_addr)); bi = user_malloc(sizeof(struct bot_addr));
#ifdef TLS
bi->ssl = 0; bi->ssl = 0;
#endif
#ifdef IPV6 #ifdef IPV6
if ((q = strchr(argv[2], '/'))) { if ((q = strchr(argv[2], '/'))) {
if (!q[1]) { if (!q[1]) {
Expand Down

0 comments on commit 2190b8c

Please sign in to comment.