diff options
author | John Crispin <blogic@openwrt.org> | 2013-07-08 22:12:28 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-07-08 23:01:49 +0200 |
commit | 5bf4764d977d35c2075fc183bd75ef5b28a03cb4 (patch) | |
tree | b7fe4f73836a665920173f4f666135bafc0e241f | |
parent | 8643c5876241474be551980e51740f2dcb8046bd (diff) | |
download | unitd-5bf4764d977d35c2075fc183bd75ef5b28a03cb4.tar unitd-5bf4764d977d35c2075fc183bd75ef5b28a03cb4.zip |
dont list services that have no instances
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r-- | service.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -212,6 +212,9 @@ service_dump(struct service *s, int verbose) struct service_instance *in; void *c, *i; + if (avl_is_empty(&s->instances.avl)) + return; + c = blobmsg_open_table(&b, s->name); i = blobmsg_open_table(&b, "instances"); if (verbose && s->trigger) |