Start refresh timer after handling any event by bbfdmd

This commit is contained in:
Amin Ben Romdhane 2024-03-25 13:11:47 +01:00
parent bf86ab992c
commit 970ae77bde
3 changed files with 5 additions and 2 deletions

View file

@ -50,7 +50,6 @@ LIST_HEAD(head_registered_service);
static void cancel_periodic_timers(struct ubus_context *ctx);
static void run_schema_updater(struct bbfdm_context *u);
static void periodic_instance_updater(struct uloop_timeout *t);
static void register_instance_refresh_timer(struct ubus_context *ctx, int start_sec);
// Global variables
static void *deamon_lib_handle = NULL;
@ -1648,7 +1647,7 @@ static void cancel_periodic_timers(struct ubus_context *ctx)
}
}
static void register_instance_refresh_timer(struct ubus_context *ctx, int start_in)
void register_instance_refresh_timer(struct ubus_context *ctx, int start_in)
{
struct bbfdm_context *u;
unsigned refresh_time = 0;

View file

@ -67,4 +67,6 @@ typedef struct bbfdm_data {
int trans_id;
} bbfdm_data_t;
void register_instance_refresh_timer(struct ubus_context *ctx, int start_sec);
#endif /* BBFDMD_H */

View file

@ -92,6 +92,8 @@ static void bbfdm_event_handler(struct ubus_context *ctx, struct ubus_event_hand
blob_buf_free(&bb);
blob_buf_free(&b);
register_instance_refresh_timer(ctx, 2000);
end:
bbf_cleanup(&bbf_ctx);
}