removed unnecessary pass of the request to an internal funtion
This commit is contained in:
parent
aa3e5d1b6f
commit
f7c787ba1e
|
|
@ -162,7 +162,7 @@ int evrsrm_recv(EV_RSR_t *evrsr_request) {
|
||||||
}
|
}
|
||||||
int evrsr_response;
|
int evrsr_response;
|
||||||
if (evrsr_request->messageBody.present == EV_RSR_MessageBody_PR_preReservationRequestMessage)
|
if (evrsr_request->messageBody.present == EV_RSR_MessageBody_PR_preReservationRequestMessage)
|
||||||
evrsr_response = evrsrm_pre_reservation_response(evrsr_request, bpr->data.buf, (uint32_t *)&bpr->data.size);
|
evrsr_response = evrsrm_pre_reservation_response(bpr->data.buf, (uint32_t *)&bpr->data.size);
|
||||||
// else if (evrsr_request->messageBody.present == EV_RSR_MessageBody_PR_reservationRequestMessage)
|
// else if (evrsr_request->messageBody.present == EV_RSR_MessageBody_PR_reservationRequestMessage)
|
||||||
// evrsr_response = evrsrm_reservation_response(evrsr_request);
|
// evrsr_response = evrsrm_reservation_response(evrsr_request);
|
||||||
if (evrsr_response != 0) {
|
if (evrsr_response != 0) {
|
||||||
|
|
@ -211,10 +211,7 @@ cleanup:
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int evrsrm_pre_reservation_response(EV_RSR_t *evrsr_request, uint8_t *evrsrm_oer, uint32_t *evrsrm_len) {
|
static int evrsrm_pre_reservation_response(uint8_t *evrsrm_oer, uint32_t *evrsrm_len) {
|
||||||
if (!evrsr_request->messageBody.present == EV_RSR_MessageBody_PR_preReservationRequestMessage)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
EV_RSR_t *evrsr_response = calloc(1, sizeof(EV_RSR_t));
|
EV_RSR_t *evrsr_response = calloc(1, sizeof(EV_RSR_t));
|
||||||
evrsr_response->header.protocolVersion = 1;
|
evrsr_response->header.protocolVersion = 1;
|
||||||
evrsr_response->header.messageID = 1;
|
evrsr_response->header.messageID = 1;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ int evrsrm_recv(EV_RSR_t *evrsr_request);
|
||||||
* @return The reservation response or NULL if the request isn't a Pre reservation request
|
* @return The reservation response or NULL if the request isn't a Pre reservation request
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int evrsrm_pre_reservation_response(EV_RSR_t *evrsr_request, uint8_t *evrsrm_oer, uint32_t *evrsrm_len);
|
static int evrsrm_pre_reservation_response(uint8_t *evrsrm_oer, uint32_t *evrsrm_len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Analyses a evm
|
* Analyses a evm
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue