summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2020-11-02 17:25:08 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2020-11-12 08:18:46 +0100
commit200ddeac727a0037efb193a9e6eb93721dc84c3d (patch)
treed072712ef8fa6eedfa729df1e6297d7d0c6cd8c9
parent86b6ed41d5044a852ea69d6012cb56eeae7dcd7b (diff)
filedb: Ensure rules are written
After changing the values, make sure that new values are written on disk. Bug-AGL: SPEC-3677 Change-Id: Ib72f72ba2571f046bd76b7985b503f7f598a72bf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/filedb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/filedb.c b/src/filedb.c
index 1fa8a17..86e4ce3 100644
--- a/src/filedb.c
+++ b/src/filedb.c
@@ -710,7 +710,7 @@ gc_add(
if (gc_dig(array, count, item, &index))
return count; /* already in */
- /* shift the elemetns above index */
+ /* shift the elements above index */
i = count;
while (i > index) {
array[i] = array[i - 1];
@@ -847,6 +847,8 @@ gc_itf(
qsort_r(renum, new_count, sizeof *renum, cmpnames, filedb);
/* set as changed */
+ filedb->frules.saved = uuidlen;
+ filedb->fnames.saved = uuidlen;
filedb->is_changed = true;
}