From ce0737fc9d1358d3f50b10fd2d48ddeb444e398b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Jan 2025 11:00:34 +0100 Subject: [PATCH] Remove double-add of PNF connection There is no need to add the PNF in nr_start_resp_cb(), because it has already been done in nr_param_resp_cb(). This might be wrong, because 4G does it only in nr_start_resp_cb(), but for the moment, since it is also used in nr_param_resp_cb(), avoid the double add. --- nfapi/oai_integration/aerial/fapi_vnf_p5.c | 6 ------ nfapi/oai_integration/nfapi_vnf.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p5.c b/nfapi/oai_integration/aerial/fapi_vnf_p5.c index 26c59c8301..9acd67147d 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p5.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p5.c @@ -335,12 +335,6 @@ int aerial_nr_config_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_co int aerial_nr_start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_start_response_scf_t *resp) { NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Received NFAPI_START_RESP idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id); - vnf_info *vnf = (vnf_info *)(config->user_data); - pnf_info *pnf = vnf->pnfs; - phy_info *phy = pnf->phys; - vnf_p7_info *p7_vnf = vnf->p7_vnfs; - - nfapi_vnf_p7_add_pnf((p7_vnf->config), phy->remote_addr, phy->remote_port, phy->id); return 0; } diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 1da5f66a52..17c431fa67 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -1690,12 +1690,6 @@ int start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_start_response_t int nr_start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_start_response_scf_t *resp) { NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] Received NFAPI_START_RESP idx:%d phy_id:%d\n", p5_idx, resp->header.phy_id); - vnf_info *vnf = (vnf_info *)(config->user_data); - pnf_info *pnf = vnf->pnfs; - phy_info *phy = pnf->phys; - vnf_p7_info *p7_vnf = vnf->p7_vnfs; - - nfapi_vnf_p7_add_pnf((p7_vnf->config), phy->remote_addr, phy->remote_port, phy->id); return 0; }