diff --git a/src/evm.c b/src/evm.c index b48f882..b24abaa 100644 --- a/src/evm.c +++ b/src/evm.c @@ -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);