aboutsummaryrefslogtreecommitdiff
path: root/src/util/configuration.c
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-07-31 20:03:44 +0200
committerFlorian Dold <florian@dold.me>2021-07-31 20:03:44 +0200
commit0ba0680c89ecfaf065187bde52733b3672a5ce9e (patch)
tree510e2c9838ab08e799a62ed6151a08dc6bf2554a /src/util/configuration.c
parent9b3442d2f84759594dbec7f8231d750fad649372 (diff)
downloadgnunet-0ba0680c89ecfaf065187bde52733b3672a5ce9e.tar.gz
gnunet-0ba0680c89ecfaf065187bde52733b3672a5ce9e.zip
-config: allow empty config for @inline-secret@
Diffstat (limited to 'src/util/configuration.c')
-rw-r--r--src/util/configuration.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/util/configuration.c b/src/util/configuration.c
index f7277b3cb..93bc03189 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -589,11 +589,15 @@ handle_inline (struct GNUNET_CONFIGURATION_Handle *cfg,
589 cs = find_section (other_cfg, restrict_section); 589 cs = find_section (other_cfg, restrict_section);
590 if (NULL == cs) 590 if (NULL == cs)
591 { 591 {
592 LOG (GNUNET_ERROR_TYPE_ERROR, 592 LOG (GNUNET_ERROR_TYPE_INFO,
593 "inlined configuration '%s' does not contain section '%s'\n", 593 "Configuration file '%s' loaded with @inline-secret@ "
594 "does not contain section '%s'.\n",
594 inline_path, 595 inline_path,
595 restrict_section); 596 restrict_section);
596 fun_ret = GNUNET_SYSERR; 597 /* Inlined onfiguration is accessible but doesn't contain any values.
598 We treat this as if the inlined section was empty, and do not
599 consider it an error. */
600 fun_ret = GNUNET_OK;
597 goto cleanup; 601 goto cleanup;
598 } 602 }
599 for (struct ConfigEntry *ce = cs->entries; 603 for (struct ConfigEntry *ce = cs->entries;
@@ -616,7 +620,7 @@ handle_inline (struct GNUNET_CONFIGURATION_Handle *cfg,
616 { 620 {
617 fun_ret = GNUNET_OK; 621 fun_ret = GNUNET_OK;
618 } 622 }
619 cleanup: 623 cleanup:
620 cfg->current_nest_level = old_nest_level; 624 cfg->current_nest_level = old_nest_level;
621 if (NULL != other_cfg) 625 if (NULL != other_cfg)
622 GNUNET_CONFIGURATION_destroy (other_cfg); 626 GNUNET_CONFIGURATION_destroy (other_cfg);
@@ -2310,7 +2314,7 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg,
2310 if (fun_ret != GNUNET_OK) 2314 if (fun_ret != GNUNET_OK)
2311 break; 2315 break;
2312 } 2316 }
2313 cleanup: 2317 cleanup:
2314 if (files_context.files_length > 0) 2318 if (files_context.files_length > 0)
2315 { 2319 {
2316 for (size_t i = 0; i < files_context.files_length; i++) 2320 for (size_t i = 0; i < files_context.files_length; i++)