Commit f37264e6 authored by Melissa Elkadi's avatar Melissa Elkadi

Avoiding unnecessary casting and fixed bug in ul_tti handling

parent b3145dec
...@@ -663,7 +663,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea ...@@ -663,7 +663,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
{ {
nfapi_nr_dl_tti_request_t *dl_tti_request = MALLOC(sizeof(*dl_tti_request)); nfapi_nr_dl_tti_request_t *dl_tti_request = MALLOC(sizeof(*dl_tti_request));
if (nfapi_nr_p7_message_unpack((void *)buffer, len, dl_tti_request, if (nfapi_nr_p7_message_unpack(buffer, len, dl_tti_request,
sizeof(*dl_tti_request), NULL) < 0) sizeof(*dl_tti_request), NULL) < 0)
{ {
LOG_E(NR_PHY, "Message dl_tti_request failed to unpack\n"); LOG_E(NR_PHY, "Message dl_tti_request failed to unpack\n");
...@@ -683,7 +683,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea ...@@ -683,7 +683,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
{ {
nfapi_nr_tx_data_request_t *tx_data_request = MALLOC(sizeof(*tx_data_request)); nfapi_nr_tx_data_request_t *tx_data_request = MALLOC(sizeof(*tx_data_request));
if (nfapi_nr_p7_message_unpack((void *)buffer, len, tx_data_request, if (nfapi_nr_p7_message_unpack(buffer, len, tx_data_request,
sizeof(*tx_data_request), NULL) < 0) sizeof(*tx_data_request), NULL) < 0)
{ {
LOG_E(NR_PHY, "Message tx_data_request failed to unpack\n"); LOG_E(NR_PHY, "Message tx_data_request failed to unpack\n");
...@@ -703,7 +703,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea ...@@ -703,7 +703,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
{ {
nfapi_nr_ul_dci_request_t *ul_dci_request = MALLOC(sizeof(*ul_dci_request)); nfapi_nr_ul_dci_request_t *ul_dci_request = MALLOC(sizeof(*ul_dci_request));
if (nfapi_nr_p7_message_unpack((void *)buffer, len, ul_dci_request, if (nfapi_nr_p7_message_unpack(buffer, len, ul_dci_request,
sizeof(*ul_dci_request), NULL) < 0) sizeof(*ul_dci_request), NULL) < 0)
{ {
LOG_E(NR_PHY, "Message ul_dci_request failed to unpack\n"); LOG_E(NR_PHY, "Message ul_dci_request failed to unpack\n");
...@@ -723,8 +723,8 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea ...@@ -723,8 +723,8 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
{ {
nfapi_nr_ul_tti_request_t *ul_tti_request = MALLOC(sizeof(*ul_tti_request)); nfapi_nr_ul_tti_request_t *ul_tti_request = MALLOC(sizeof(*ul_tti_request));
if (nfapi_nr_p7_message_unpack((void *)buffer, len, &ul_tti_request, if (nfapi_nr_p7_message_unpack(buffer, len, ul_tti_request,
sizeof(ul_tti_request), NULL) < 0) sizeof(*ul_tti_request), NULL) < 0)
{ {
LOG_E(NR_PHY, "Message ul_tti_request failed to unpack\n"); LOG_E(NR_PHY, "Message ul_tti_request failed to unpack\n");
break; break;
...@@ -829,7 +829,7 @@ void *nrue_standalone_pnf_task(void *context) ...@@ -829,7 +829,7 @@ void *nrue_standalone_pnf_task(void *context)
else else
{ {
nfapi_p7_message_header_t header; nfapi_p7_message_header_t header;
if (nfapi_p7_message_header_unpack((void *)buffer, len, &header, sizeof(header), NULL) < 0) if (nfapi_p7_message_header_unpack(buffer, len, &header, sizeof(header), NULL) < 0)
{ {
LOG_E(NR_PHY, "Header unpack failed for nrue_standalone pnf\n"); LOG_E(NR_PHY, "Header unpack failed for nrue_standalone pnf\n");
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment