From: John Crispin Date: Mon, 8 Jul 2013 20:12:28 +0000 (+0200) Subject: dont list services that have no instances X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5bf4764d977d35c2075fc183bd75ef5b28a03cb4;p=oweals%2Fprocd.git dont list services that have no instances Signed-off-by: John Crispin --- diff --git a/service.c b/service.c index 7db1c4a..ffbc584 100644 --- a/service.c +++ b/service.c @@ -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)