1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-01-19 12:02:52 +00:00

Free all listen ports on initialization

Now you can reconfigure listen ports and reload the server configuration
on runtime. Without this patch, no ports could be removed.
This commit is contained in:
Alexander Barton 2012-09-21 10:41:03 +02:00
parent bb20aeb9bc
commit ef82ef4ddb

View File

@ -104,6 +104,8 @@ ConfSSL_Init(void)
free(Conf_SSLOptions.DHFile); free(Conf_SSLOptions.DHFile);
Conf_SSLOptions.DHFile = NULL; Conf_SSLOptions.DHFile = NULL;
array_free_wipe(&Conf_SSLOptions.KeyFilePassword); array_free_wipe(&Conf_SSLOptions.KeyFilePassword);
array_free(&Conf_SSLOptions.ListenPorts);
} }
/** /**
@ -689,6 +691,7 @@ Set_Defaults(bool InitServers)
PACKAGE_NAME, PACKAGE_VERSION); PACKAGE_NAME, PACKAGE_VERSION);
free(Conf_ListenAddress); free(Conf_ListenAddress);
Conf_ListenAddress = NULL; Conf_ListenAddress = NULL;
array_free(&Conf_ListenPorts);
array_free(&Conf_Motd); array_free(&Conf_Motd);
strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile)); strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile));
strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile)); strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile));