X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=service%2Finstance.c;h=bfc0979c0fbab607a6c0a93de07294d3f9dc1821;hb=29d2adb14bb1e9715b1391d2724b281d01ef8d0a;hp=10e35ca6f295dc21aa041e3ae3eedd6b67e07c55;hpb=755117ebf58cce6d38cde5236016c7c9158ba97b;p=project%2Fprocd.git diff --git a/service/instance.c b/service/instance.c index 10e35ca..bfc0979 100644 --- a/service/instance.c +++ b/service/instance.c @@ -919,25 +919,21 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr in_src->config = NULL; } -bool +void instance_update(struct service_instance *in, struct service_instance *in_new) { bool changed = instance_config_changed(in, in_new); bool running = in->proc.pending; - if (!changed && running) - return false; - if (!running) { - if (changed) - instance_config_move(in, in_new); + instance_config_move(in, in_new); instance_start(in); } else { - instance_restart(in); + if (changed) + instance_restart(in); instance_config_move(in, in_new); /* restart happens in the child callback handler */ } - return true; } void