return 0;
}
-static void _service_stopped(struct service *s, bool container);
-
static void
service_delete(struct service *s, bool container)
{
free(s->data);
vlist_flush_all(&s->instances);
s->deleted = true;
- _service_stopped(s, container);
+ service_stopped(s);
}
enum {
if (!s)
return UBUS_STATUS_UNKNOWN_ERROR;
+ s->container = container;
+
ret = service_update(s, tb, add);
if (ret)
return ret;
}
void service_stopped(struct service *s)
-{
- _service_stopped(s, false);
-}
-
-static void _service_stopped(struct service *s, bool container)
{
if (s->deleted && avl_is_empty(&s->instances.avl)) {
- if (container) {
+ if (s->container) {
service_event("container.stop", s->name, NULL);
avl_delete(&containers, &s->avl);
} else {