diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-10-11 12:00:28 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-10-11 12:00:28 +0300 |
commit | fd49c1902f656e1cbb407c610764fd2b56ff1985 (patch) | |
tree | f6b789ebb303b4af16d36a341992888bf1224305 | |
parent | 83e768166caff8c1b7649245026c894097ead7ae (diff) | |
download | tallyman-fd49c1902f656e1cbb407c610764fd2b56ff1985.tar.gz tallyman-fd49c1902f656e1cbb407c610764fd2b56ff1985.tar.bz2 |
Minor fix
* src/servdb.c (servdb_update): Notify hostproc if the
container ID of the instance has changed.
-rw-r--r-- | src/servdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/servdb.c b/src/servdb.c index 1c0c123..90b5504 100644 --- a/src/servdb.c +++ b/src/servdb.c @@ -257,7 +257,9 @@ servdb_update(struct json_value *obj) int status; char const *hostname; char const *id; - int new_inst; + int new_inst; /* Whether this instance should be considered "new", + i.e. a notification about it needs to be sent to + hostproc */ val = json_value_lookup_typed(obj, "status", json_bool); if (!val) @@ -300,6 +302,7 @@ servdb_update(struct json_value *obj) inst->container_id = strdup(val->v.s); if (!inst->container_id) grecs_error(NULL, 0, "out of memory"); + new_inst = 1; } } |