summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-04-23 10:19:24 +0200
committerXavier Simonart <xavier.simonart@intel.com>2018-04-23 10:27:51 +0200
commitbb2dbfad827bc8e27a2a4e8de59c971ab5043e82 (patch)
tree7958aaa3ebf5f0ee35ead80af58ca9f5aa2ab013 /VNFs/DPPD-PROX
parentca2085d3c7a630da6a1f28ee49b605d214d6b2e7 (diff)
Add support for multiple variables in core definition
In the [core] definition we were able to use one variable such as $core1 in [core $core1] but not [core ${core1}]. The second syntax is used when we want multiple variables such as in [core ${first_core}-${last_core}]. This second syntax is now supported. Change-Id: Ic94b84cb8cf827acb6697789cd180f41c3bdb028 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/cfgfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/cfgfile.c b/VNFs/DPPD-PROX/cfgfile.c
index 0c5950e4..b15fc0ad 100644
--- a/VNFs/DPPD-PROX/cfgfile.c
+++ b/VNFs/DPPD-PROX/cfgfile.c
@@ -191,9 +191,10 @@ static struct cfg_section *cfg_check_section(char *buffer, struct cfg_section *p
/* only numeric characters are valid for section index */
char val[MAX_CFG_STRING_LEN];
- if (pend[0] == '$')
- parse_single_var(val, sizeof(val), pend);
- else
+ if (pend[0] == '$') {
+ if (parse_vars(val, sizeof(val), pend))
+ return NULL;
+ } else
strncpy(val, pend, sizeof(val));
for (len = 0; val[len] != '\0'; ++len) {