diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-06-06 07:21:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-06-06 08:24:28 +0300 |
commit | b220b5a367469c571358c34ea0df813522e99485 (patch) | |
tree | 600e8f26555a359b9d5297b1d566717a1ec78182 /src/piesctl.c | |
parent | 44efb0cda486e2614603e6dd78b0c93407f63c3b (diff) | |
download | pies-b220b5a367469c571358c34ea0df813522e99485.tar.gz pies-b220b5a367469c571358c34ea0df813522e99485.tar.bz2 |
Update the grecs submodule
* configure.ac (GRECS_SETUP): Request the tree-api
* grecs: Pull a0c096190f
* lib/envop.c (environ_set): Call wordsplit_free unconditionally.
* lib/grecsasrt.c (assert_grecs_value_type)
(assert_scalar_stmt): Remove.
(conf_callback_url): Switch to tree-api.
* lib/grecsasrt.h: Likewise.
* src/acl.c: Rewrite grecs callbacks in the tree API style.
Use grecs assertions.
* src/acl.h: Likewise.
* src/meta1parse.c: Likewise.
* src/pies.c: Likewise.
* src/piesctl.c: Likewise.
* src/comp.c (component_finish): Check whether the "command" statement
was used.
Diffstat (limited to 'src/piesctl.c')
-rw-r--r-- | src/piesctl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/piesctl.c b/src/piesctl.c index 4c777d7..390ccfc 100644 --- a/src/piesctl.c +++ b/src/piesctl.c @@ -80,10 +80,12 @@ static struct grecs_keyword instance_keywords[] = { static int callback_instance (enum grecs_callback_command cmd, - grecs_locus_t *locus, - void *varptr, - grecs_value_t *value, void *cb_data) + grecs_node_t *node, + void *varptr, void *cb_data) { + grecs_locus_t *locus = &node->locus; + grecs_value_t *value = node->v.value; + switch (cmd) { case grecs_callback_section_begin: @@ -92,7 +94,7 @@ callback_instance (enum grecs_callback_command cmd, grecs_error (locus, 0, _("missing tag")); return 1; } - if (assert_grecs_value_type (&value->locus, value, GRECS_TYPE_STRING)) + if (grecs_assert_value_type (value, GRECS_TYPE_STRING, locus)) return 1; if (strcmp (value->v.string, instance) == 0) *(struct client_conn **) cb_data = &client; @@ -184,8 +186,10 @@ parse_config (void) node = grecs_find_node (tree, "/control/socket"); if (node) { - assert_grecs_value_type (&node->locus, - node->v.value, GRECS_TYPE_STRING); + if (grecs_assert_value_type (node->v.value, GRECS_TYPE_STRING, + &node->locus)) + exit (EX_CONFIG); + if (pies_url_create (&client.url, node->v.value->v.string)) { grecs_error (&node->locus, 0, _("%s: cannot create URL: %s"), |