summaryrefslogtreecommitdiff
path: root/handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'handler.c')
-rw-r--r--handler.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/handler.c b/handler.c
new file mode 100644
index 0000000..581001e
--- /dev/null
+++ b/handler.c
@@ -0,0 +1,13 @@
+#include "handler.h"
+
+extern inline void handle(const char *, size_t, struct container *);
+
+void recurse(struct json_object *outer, const char *keys[], struct json_object **services)
+{
+ struct json_object *inner = NULL;
+ json_object_object_get_ex(outer, *keys, &inner);
+ if (*++keys)
+ recurse(inner, keys, services);
+ else
+ *services = inner;
+}