summaryrefslogtreecommitdiff
path: root/src/analysis/db/cdb.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-17 22:06:54 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-17 22:06:54 (GMT)
commit3dc843b3f7991dcd738a30821ff56c7fe13f1094 (patch)
tree22b40ef7cd933a57942bd01d61c9e6a07fdd80c6 /src/analysis/db/cdb.c
parent682159e73cfbf8ec61d2f2aba765be1016a30ded (diff)
Kept tracks of current active DB items.
Diffstat (limited to 'src/analysis/db/cdb.c')
-rw-r--r--src/analysis/db/cdb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c
index 597242f..a787a19 100644
--- a/src/analysis/db/cdb.c
+++ b/src/analysis/db/cdb.c
@@ -146,7 +146,7 @@ static bool g_cdb_archive_create_db(const GCdbArchive *);
static bool g_cdb_archive_load_collections(GCdbArchive *);
/* Réagit à une modification au sein d'une collection donnée. */
-static void on_collection_changed(GDbCollection *, DBAction, GDbItem *, GCdbArchive *);
+static void on_collection_extended(GDbCollection *, GDbItem *, GCdbArchive *);
/* Assure le traitement des requêtes de clients. */
static void *g_cdb_archive_process(GCdbArchive *);
@@ -742,7 +742,7 @@ static bool g_cdb_archive_load_collections(GCdbArchive *archive)
iter = g_list_next(iter))
{
collec = G_DB_COLLECTION(iter->data);
- g_signal_connect(collec, "content-changed", G_CALLBACK(on_collection_changed), archive);
+ g_signal_connect(collec, "content-extended", G_CALLBACK(on_collection_extended), archive);
if (!g_db_collection_load_all_items(collec, archive->db))
return false;
@@ -757,7 +757,6 @@ static bool g_cdb_archive_load_collections(GCdbArchive *archive)
/******************************************************************************
* *
* Paramètres : collec = collection dont le contenu a évolué. *
-* action = type d'évolution rencontrée. *
* item = élément ajouté, modifié ou supprimé. *
* archive = centralisation de tous les savoirs. *
* *
@@ -769,7 +768,7 @@ static bool g_cdb_archive_load_collections(GCdbArchive *archive)
* *
******************************************************************************/
-static void on_collection_changed(GDbCollection *collec, DBAction action, GDbItem *item, GCdbArchive *archive)
+static void on_collection_extended(GDbCollection *collec, GDbItem *item, GCdbArchive *archive)
{
packed_buffer pbuf; /* Tampon d'émission */
size_t i; /* Boucle de parcours */
@@ -777,7 +776,7 @@ static void on_collection_changed(GDbCollection *collec, DBAction action, GDbIte
init_packed_buffer(&pbuf);
- status = g_db_collection_pack(collec, &pbuf, action, item);
+ status = g_db_collection_pack(collec, &pbuf, DBA_ADD_ITEM, item);
g_mutex_lock(&archive->clients_access);