fixed update and cancellation responses not allocating the id

This commit is contained in:
gilteixeira 2023-04-26 11:47:37 +01:00
parent c770eb0a00
commit c9dc1df277
1 changed files with 6 additions and 2 deletions

View File

@ -219,7 +219,9 @@ static int evrsrm_cancellation_response(EV_RSR_t *evrsrm_request, uint8_t *evrsr
evrsr_response->messageBody.present = EV_RSR_MessageBody_PR_cancellationResponseMessage;
CancellationResponseMessage_t *evrsr_cancellation_response = &evrsr_response->messageBody.choice.cancellationResponseMessage;
evrsr_cancellation_response->reservation_ID = evrsrm_request->messageBody.choice.cancellationRequestMessage.reservation_ID;
evrsr_cancellation_response->reservation_ID.buf = calloc(8, sizeof(uint8_t));
evrsr_cancellation_response->reservation_ID.size = 8;
memccpy(evrsr_cancellation_response->reservation_ID.buf, evrsrm_request->messageBody.choice.cancellationRequestMessage.reservation_ID.buf, 0, 8);
evrsr_cancellation_response->cancellationResponseCode = CancellationResponseCode_ok;
asn_enc_rval_t enc = uper_encode_to_buffer(&asn_DEF_EV_RSR, NULL, evrsr_response, evrsrm_oer, 512);
@ -245,7 +247,9 @@ static int evrsrm_update_response(EV_RSR_t *evrsrm_request, uint8_t *evrsrm_oer,
evrsr_response->messageBody.present = EV_RSR_MessageBody_PR_updateResponseMessage;
UpdateResponseMessage_t *evrsr_update_response = &evrsr_response->messageBody.choice.updateResponseMessage;
evrsr_update_response->reservation_ID = evrsrm_request->messageBody.choice.updateRequestMessage.reservation_ID;
evrsr_update_response->reservation_ID.buf = calloc(8, sizeof(uint8_t));
evrsr_update_response->reservation_ID.size = 8;
memccpy(evrsr_update_response->reservation_ID.buf, evrsrm_request->messageBody.choice.updateRequestMessage.reservation_ID.buf, 0, 8);
evrsr_update_response->updateResponseCode = UpdateResponseCode_ok;
asn_enc_rval_t enc = uper_encode_to_buffer(&asn_DEF_EV_RSR, NULL, evrsr_response, evrsrm_oer, 512);