Code

core: Make the plugin directory configurable.
[sysdb.git] / src / tools / sysdbd / configfile.c
index 9e918d5c7f40af750929ed9a51d12238eae42971..8dc4394f7abfce9450b82a6b01c69f6aa32eb74e 100644 (file)
@@ -176,7 +176,7 @@ daemon_load_plugin(oconfig_item_t *ci)
        }
 
        /* returns a negative value on error */
-       return sdb_plugin_load(name, NULL);
+       return sdb_plugin_load(NULL, name, NULL);
 } /* daemon_load_plugin */
 
 static int
@@ -215,7 +215,7 @@ daemon_load_backend(oconfig_item_t *ci)
                }
        }
 
-       return sdb_plugin_load(plugin_name, &ctx);
+       return sdb_plugin_load(NULL, plugin_name, &ctx);
 } /* daemon_load_backend */
 
 static int
@@ -250,6 +250,22 @@ static token_parser_t token_parser_list[] = {
  * 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)
 {
@@ -281,6 +297,9 @@ daemon_parse_config(const char *filename)
                        retval = status;
                }
        }
+
+       oconfig_free(ci);
+       free(ci);
        return retval;
 } /* daemon_parse_config */