diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-03 20:37:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-03 20:37:28 (GMT) |
commit | 94792f74a850cf6bb119c59ac0675591f4ef6c0f (patch) | |
tree | 42f4071ef1c5850e73331779d4956d3c738a88a6 | |
parent | c447efb6a85e84b72c1d72b8b1b7d1c812579a55 (diff) |
Fixed a buggy code when updating database for connected clients.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/analysis/db/cdb.c | 7 |
2 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,10 @@ 17-03-03 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/db/cdb.c: + Fix a buggy code when updating database for connected clients. + +17-03-03 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/binary.c: Hide binary code by default. diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c index 167fa0c..49662e8 100644 --- a/src/analysis/db/cdb.c +++ b/src/analysis/db/cdb.c @@ -809,18 +809,15 @@ static void on_collection_changed(GDbCollection *collec, DBAction action, GDbIte init_packed_buffer(&pbuf); - status = true; + status = g_db_collection_pack(collec, &pbuf, action, item); g_mutex_lock(&archive->clients_access); for (i = 0; i < archive->count && status; i++) - status = g_db_collection_pack(collec, &pbuf, action, item); + status = send_packed_buffer(&pbuf, archive->clients[i].fd); g_mutex_unlock(&archive->clients_access); - if (status) - status = send_packed_buffer(&pbuf, archive->clients[i].fd); - exit_packed_buffer(&pbuf); if (!status) |