From 1a76fd89cb7042fc419d53879d8701fd7920f096 Mon Sep 17 00:00:00 2001 From: emanuel Date: Tue, 22 Jun 2021 14:02:08 +0100 Subject: [PATCH] Save IVIM_t struct upon new IVIM --- src/infrastructure.c | 1 + src/requests.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/infrastructure.c b/src/infrastructure.c index b37ef98..55f078a 100644 --- a/src/infrastructure.c +++ b/src/infrastructure.c @@ -331,6 +331,7 @@ static int service_add(infrastructure_t* infrastructure, enum SERVICE_TYPE type, } if (index != -1) { + infrastructure->services[index]->ivim = ivim; infrastructure->services[index]->id = rand(); *id = infrastructure->services[index]->id; infrastructure->services[index]->enabled = true; diff --git a/src/requests.c b/src/requests.c index 49d9bc5..e2401b3 100644 --- a/src/requests.c +++ b/src/requests.c @@ -343,7 +343,7 @@ int facilities_request_active_events(facilities_t* facilities, void* responder, fdres->result->choice.events.list.size = nae * sizeof(DENM_t *); fdres->result->choice.events.list.array = malloc(nae * sizeof(DENM_t *)); for (int i = 0, j = 0; j < nae; ++i) { - if (facilities->den->events[i]->state == EVENT_ACTIVE) { + if (facilities->den->events[i]->enabled && facilities->den->events[i]->state == EVENT_ACTIVE) { fdres->result->choice.events.list.array[j] = calloc(1, sizeof(ItsMessage_t)); fdres->result->choice.events.list.array[j]->itsMessageType = ItsMessageType_denm; fdres->result->choice.events.list.array[j]->data.buf = malloc(2048);