From 69613d5180b2c17e70ade2fc57f78bba5d71fb04 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Tue, 22 May 2018 09:56:59 +0800 Subject: [PATCH] ignore configuration entries nested under an unknown element Signed-off-by: Erik Boasson --- src/core/ddsi/src/q_config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/ddsi/src/q_config.c b/src/core/ddsi/src/q_config.c index 46c32f5..2c90458 100644 --- a/src/core/ddsi/src/q_config.c +++ b/src/core/ddsi/src/q_config.c @@ -2482,9 +2482,10 @@ static int proc_elem_open(void *varg, UNUSED_ARG(uintptr_t parentinfo), UNUSED_A break; } } - if ( cfg_subelem == NULL || cfg_subelem->name == NULL ) + if ( cfg_subelem == NULL || cfg_subelem->name == NULL ) { + cfgst_push(cfgst, 0, NULL, NULL); return cfg_error(cfgst, "%s: unknown element", name); - else if ( strcmp(cfg_subelem->name, "*") == 0 ) { + } else if ( strcmp(cfg_subelem->name, "*") == 0 ) { /* Push a marker that we are to ignore this part of the DOM tree */ cfgst_push(cfgst, 0, NULL, NULL); return 1;