summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-12-18 15:17:16 +0100
committerJo-Philipp Wich <jow@openwrt.org>2013-12-18 17:27:49 +0100
commit2dc572df0e3002263c0a49ebbc329ed1b6c42a01 (patch)
treefcc441a5cfba3bdc65a491df03ef905d79259829
parentb76325945d31280b2ffecf898bfc62aa5f3d22d4 (diff)
downloadunitd-2dc572df0e3002263c0a49ebbc329ed1b6c42a01.tar
unitd-2dc572df0e3002263c0a49ebbc329ed1b6c42a01.zip
procd: fix service file tracking
The instance_config_move() function in the procd instance managing code is missing a blobmsg_list_move() call to update the tracked file items with the newly calculated checksums in case of a file change. Without that change, services are always reloaded after the first change to a tracked file regardless of whether there are any subsequent changes or not. Add a missing instance of blobmsg_list_free() as well. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--service/instance.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/instance.c b/service/instance.c
index 27b81f5..3e784bf 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -434,6 +434,7 @@ instance_config_cleanup(struct service_instance *in)
blobmsg_list_free(&in->env);
blobmsg_list_free(&in->data);
blobmsg_list_free(&in->netdev);
+ blobmsg_list_free(&in->file);
blobmsg_list_free(&in->limits);
}
@@ -444,6 +445,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr
blobmsg_list_move(&in->env, &in_src->env);
blobmsg_list_move(&in->data, &in_src->data);
blobmsg_list_move(&in->netdev, &in_src->netdev);
+ blobmsg_list_move(&in->file, &in_src->file);
blobmsg_list_move(&in->limits, &in_src->limits);
in->trigger = in_src->trigger;
in->command = in_src->command;