diff options
Diffstat (limited to 'src/analysis/db/client.c')
-rw-r--r-- | src/analysis/db/client.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/analysis/db/client.c b/src/analysis/db/client.c index f0d3d4b..2a5a185 100644 --- a/src/analysis/db/client.c +++ b/src/analysis/db/client.c @@ -525,3 +525,33 @@ bool g_db_client_save(GDbClient *client) return result; } + + +/****************************************************************************** +* * +* Paramètres : client = client pour les accès distants à manipuler. * +* timestamp = date du dernier élément à garder comme actif. * +* * +* Description : Active les éléments en amont d'un horodatage donné. * +* * +* Retour : true si la commande a bien été envoyée, false sinon. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_db_client_set_last_active(GDbClient *client, timestamp_t timestamp) +{ + bool result; /* Bilan partiel à remonter */ + + g_db_client_get_fd(client); + + result = safe_send(client->fd, (uint32_t []) { htobe32(DBC_SET_LAST_ACTIVE) }, sizeof(uint32_t), 0); + + result &= send_timestamp(×tamp, client->fd, MSG_MORE); + + g_db_client_put_fd(client); + + return result; + +} |