summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/analysis/db/cdb.c30
2 files changed, 18 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 96684d0..c1e6d79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+15-02-10 Cyrille Bagard <nocbos@gmail.com>
+
+ * src/analysis/db/cdb.c:
+ Fix a bug by reordering the first exchanges.
+
15-02-09 Cyrille Bagard <nocbos@gmail.com>
* src/analysis/binary.c:
diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c
index 014a6d8..d56c1fa 100644
--- a/src/analysis/db/cdb.c
+++ b/src/analysis/db/cdb.c
@@ -972,10 +972,22 @@ DBError g_cdb_archive_add_client(GCdbArchive *archive, int fd, const rle_string
archive->clients[archive->count - 1].fd = fd;
dup_rle_string(&archive->clients[archive->count - 1].user, user);
+ /* Démarrage ou redémarrage du processus d'écoute */
+ if (archive->process == NULL)
+ {
+ archive->process = g_thread_new("cdb_process", (GThreadFunc)g_cdb_archive_process, archive);
- /* Envoi des mises à jour au nouveau client... */
+ /* On attend que le processus parallèle soit prêt */
+ for (process_id = &archive->process_id; *process_id == 0; );
+ }
+ else
+ pthread_kill(archive->process_id, SIGUSR1);
+
+ g_mutex_unlock(&archive->clients_access);
+
+ /* Envoi des mises à jour au nouveau client... */
for (iter = g_list_first(archive->collections);
iter != NULL;
@@ -994,22 +1006,6 @@ DBError g_cdb_archive_add_client(GCdbArchive *archive, int fd, const rle_string
- /* Démarrage ou redémarrage du processus d'écoute */
-
- if (archive->process == NULL)
- {
- archive->process = g_thread_new("cdb_process", (GThreadFunc)g_cdb_archive_process, archive);
-
- /* On attend que le processus parallèle soit prêt */
- for (process_id = &archive->process_id; *process_id == 0; );
-
- }
- else
- pthread_kill(archive->process_id, SIGUSR1);
-
- g_mutex_unlock(&archive->clients_access);
-
-
return DBE_NONE; ////
}