Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port refresh flags Issue 145 #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/s_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,32 @@ void report_listener_error(char *text, aListener *lptr)
return;
}

void
modify_listener_flags(aPort *aport)
{
aListener *lptr = aport->lstn;

#ifdef USE_SSL
extern int ssl_capable;
#endif

if (lptr->flags != aport->flags)
{
lptr->flags = aport->flags;

#ifdef USE_SSL
if (lptr->flags & CONF_FLAGS_P_SSL && ssl_capable)
{
SetSSL(lptr);
lptr->ssl = NULL;
lptr->client_cert = NULL;
}
#endif
}

return;
}

/*
* open_listeners()
*
Expand All @@ -252,7 +278,11 @@ open_listeners()
for(tmp = ports; tmp; tmp = tmp->next)
{
if(tmp->lstn)
{ // If port has connection(s), check for/make flag changes from ircd.conf during /rehash. -Holbrook
modify_listener_flags(tmp);
continue;
}

add_listener(tmp);
}
return;
Expand Down
Loading