summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 7047c00d..fc0dc9a9 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -376,12 +376,13 @@ static struct expr *json_parse_osf_expr(struct json_ctx *ctx,
const char *type, json_t *root)
{
const char *key;
+ uint8_t ttl;
- if (json_unpack_err(ctx, root, "{s:s}", "key", &key))
+ if (json_unpack_err(ctx, root, "{s:i, s:s}", "ttl", ttl,"key", &key))
return NULL;
if (!strcmp(key, "name"))
- return osf_expr_alloc(int_loc);
+ return osf_expr_alloc(int_loc, ttl);
json_error(ctx, "Invalid osf key value.");
return NULL;