summaryrefslogtreecommitdiff
path: root/src/analysis/db
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-03-03 20:37:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-03-03 20:37:28 (GMT)
commit94792f74a850cf6bb119c59ac0675591f4ef6c0f (patch)
tree42f4071ef1c5850e73331779d4956d3c738a88a6 /src/analysis/db
parentc447efb6a85e84b72c1d72b8b1b7d1c812579a55 (diff)
Fixed a buggy code when updating database for connected clients.
Diffstat (limited to 'src/analysis/db')
-rw-r--r--src/analysis/db/cdb.c7
1 files changed, 2 insertions, 5 deletions
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)