From 2d793a334aaeaefa932a6eff953680f3d0cdfa80 Mon Sep 17 00:00:00 2001 From: gilteixeira Date: Fri, 21 Apr 2023 14:22:29 +0100 Subject: [PATCH] fixed logging and the creating of the pre-reservation id --- src/evm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/evm.c b/src/evm.c index e5844a1..659f602 100644 --- a/src/evm.c +++ b/src/evm.c @@ -213,12 +213,9 @@ static int evrsrm_pre_reservation_response(uint8_t *evrsrm_oer, uint32_t *evrsrm evrsr_response->messageBody.present = EV_RSR_MessageBody_PR_preReservationResponseMessage; PreReservationResponseMessage_t response = evrsr_response->messageBody.choice.preReservationResponseMessage; - response.preReservation_ID.buf = calloc(4, sizeof(uint8_t)); - response.preReservation_ID.size = 4; - response.preReservation_ID.buf[0] = (pre_reservation_id >> 24) & 0xff; - response.preReservation_ID.buf[1] = (pre_reservation_id >> 16) & 0xff; - response.preReservation_ID.buf[2] = (pre_reservation_id >> 8) & 0xff; - response.preReservation_ID.buf[3] = pre_reservation_id & 0xff; + response.preReservation_ID.buf = calloc(8, sizeof(uint8_t)); + response.preReservation_ID.size = 8; + *(uint64_t *)response.preReservation_ID.buf = pre_reservation_id; response.availabilityStatus = 0;