aboutsummaryrefslogtreecommitdiff
path: root/src/piesctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/piesctl.c')
-rw-r--r--src/piesctl.c16
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"),

Return to:

Send suggestions and report system problems to the System administrator.