summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fffcdc9)
raw | patch | inline | side by side (parent: fffcdc9)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Apr 2014 17:38:38 +0000 (19:38 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Apr 2014 17:38:38 +0000 (19:38 +0200) |
This is a helper function for handling config settings.
src/tools/sysdbd/configfile.c | patch | blob | history | |
src/tools/sysdbd/configfile.h | patch | blob | history |
index 9e918d5c7f40af750929ed9a51d12238eae42971..5a36c22dbda222e4cdd8c923d604b4f09efa5ad8 100644 (file)
* public API
*/
+void
+daemon_free_listen_addresses(void)
+{
+ size_t i;
+
+ if (! listen_addresses)
+ return;
+
+ for (i = 0; i < listen_addresses_num; ++i)
+ free(listen_addresses[i]);
+ free(listen_addresses);
+
+ listen_addresses = NULL;
+ listen_addresses_num = 0;
+} /* daemon_free_listen_addresses */
+
int
daemon_parse_config(const char *filename)
{
index 19abe9ac55f25f041008c63315c0d828ec9e149c..2d8945c119d2b92890586c6c513711c224fcb357 100644 (file)
extern char **listen_addresses;
extern size_t listen_addresses_num;
+void
+daemon_free_listen_addresses(void);
+
/*
* daemon_parse_config:
* Parse the specified configuration file.