summaryrefslogtreecommitdiff
path: root/json-rpc-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-rpc-shell.c')
-rw-r--r--json-rpc-shell.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index ee403d5..af250b9 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1058,28 +1058,6 @@ save_configuration (struct config_item *root, const char *path_hint)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-// TODO: consider moving to liberty, degesch has exactly the same function
-static struct config_item *
-load_configuration_file (const char *filename, struct error **e)
-{
- struct config_item *root = NULL;
-
- struct str data;
- str_init (&data);
- if (!read_file (filename, &data, e))
- goto end;
-
- struct error *error = NULL;
- if (!(root = config_item_parse (data.str, data.len, false, &error)))
- {
- error_set (e, "parse error: %s", error->message);
- error_free (error);
- }
-end:
- str_free (&data);
- return root;
-}
-
static void
load_configuration (struct app_context *ctx)
{
@@ -1089,7 +1067,7 @@ load_configuration (struct app_context *ctx)
return;
struct error *e = NULL;
- struct config_item *root = load_configuration_file (filename, &e);
+ struct config_item *root = config_read_from_file (filename, &e);
free (filename);
if (e)