fixed logging and the creating of the pre-reservation id

This commit is contained in:
gilteixeira 2023-04-21 14:22:29 +01:00
parent a1f3bacea5
commit 2d793a334a
1 changed files with 3 additions and 6 deletions

View File

@ -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;