summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-10 21:14:18 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-10 21:14:18 (GMT)
commitdfa7e04b4a267f7f30086510781ca3221b7e25f8 (patch)
tree7ed391b32df8ca8b11edcb985515c0cef8f60955 /src/analysis
parent1d79469f69bba33a2280d4bd531652b71148029f (diff)
Fixed a bug by reordering the first exchanges.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@469 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/db/cdb.c30
1 files changed, 13 insertions, 17 deletions
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; ////
}