add smscb creation timestamp

Change-Id: I72cd9693eb774e21f5696217b5eea5965af952fb
This commit is contained in:
Harald Welte 2021-01-02 12:20:12 +01:00
parent 2849727777
commit ddb5057462
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/it_q.h>
#include <osmocom/gsm/protocol/gsm_48_049.h>
@ -150,10 +151,9 @@ struct cbc_message {
struct rest_it_op *it_op; /* inter-thread queue operation currently processing */
/* TODO:
* - timer for timeout after warning_period_sec
* - timestamp when the message was created / last updated
**/
struct {
time_t created; /* when was this message created? */
} time;
};
/*********************************************************************************

View File

@ -369,6 +369,7 @@ struct cbc_message *cbc_message_alloc(void *ctx, const struct cbc_message *orig_
INIT_LLIST_HEAD(&smscb->peers);
smscb->fi = fi;
smscb->it_op = NULL;
smscb->time.created = time(NULL);
fi->priv = smscb;