mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-18 17:57:39 +03:00
fail gracefully if libconfig fails to find root element
This commit is contained in:
parent
1ad450a444
commit
bf2053eb79
@ -1,5 +1,5 @@
|
|||||||
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
||||||
* on Sat May 8 07:03:13 2021.
|
* on Tue Jun 22 21:28:44 2021.
|
||||||
|
|
||||||
# conf2struct: generate libconf parsers that read to structs
|
# conf2struct: generate libconf parsers that read to structs
|
||||||
# Copyright (C) 2018-2019 Yves Rutschle
|
# Copyright (C) 2018-2019 Yves Rutschle
|
||||||
@ -1137,6 +1137,10 @@ int echocfg_cl_parse(int argc, char* argv[], struct echocfg_item* cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
s = config_lookup(&c, "/");
|
s = config_lookup(&c, "/");
|
||||||
|
if (!s) {
|
||||||
|
fprintf(stderr, "Lookup of root config failed\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
res = read_block(s, cfg, table_echocfg, &errmsg);
|
res = read_block(s, cfg, table_echocfg, &errmsg);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
||||||
* on Sat May 8 07:03:13 2021.
|
* on Tue Jun 22 21:28:44 2021.
|
||||||
|
|
||||||
# conf2struct: generate libconf parsers that read to structs
|
# conf2struct: generate libconf parsers that read to structs
|
||||||
# Copyright (C) 2018-2019 Yves Rutschle
|
# Copyright (C) 2018-2019 Yves Rutschle
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
||||||
* on Tue Mar 16 20:23:24 2021.
|
* on Tue Jun 22 21:28:43 2021.
|
||||||
|
|
||||||
# conf2struct: generate libconf parsers that read to structs
|
# conf2struct: generate libconf parsers that read to structs
|
||||||
# Copyright (C) 2018-2019 Yves Rutschle
|
# Copyright (C) 2018-2019 Yves Rutschle
|
||||||
@ -1793,6 +1793,10 @@ int sslhcfg_cl_parse(int argc, char* argv[], struct sslhcfg_item* cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
s = config_lookup(&c, "/");
|
s = config_lookup(&c, "/");
|
||||||
|
if (!s) {
|
||||||
|
fprintf(stderr, "Lookup of root config failed\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
res = read_block(s, cfg, table_sslhcfg, &errmsg);
|
res = read_block(s, cfg, table_sslhcfg, &errmsg);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
|
||||||
* on Tue Mar 16 20:23:24 2021.
|
* on Tue Jun 22 21:28:43 2021.
|
||||||
|
|
||||||
# conf2struct: generate libconf parsers that read to structs
|
# conf2struct: generate libconf parsers that read to structs
|
||||||
# Copyright (C) 2018-2019 Yves Rutschle
|
# Copyright (C) 2018-2019 Yves Rutschle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user