Commit 5a43fe8a authored by Robert Schmidt's avatar Robert Schmidt

Properly implement PNF/VNF list find

parent 740039dd
......@@ -92,18 +92,12 @@ nfapi_vnf_pnf_info_t* nfapi_vnf_pnf_list_find(nfapi_vnf_config_t* config, int p5
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "config->pnf_list:%p\n", config->pnf_list);
nfapi_vnf_pnf_info_t* curr = config->pnf_list;
while(curr != 0)
{
if(curr->p5_idx == p5_idx)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s : curr->p5_idx:%d p5_idx:%d\n", __FUNCTION__, curr->p5_idx, p5_idx);
while (curr != 0) {
if (curr->p5_idx == p5_idx)
return curr;
}
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s : curr->next:%p\n", __FUNCTION__, curr->next);
curr = curr->next;
}
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s(): could not find P5 connection for p5_idx %d\n", __func__, p5_idx);
return 0;
}
......
......@@ -88,14 +88,12 @@ void vnf_p7_connection_info_list_add(vnf_p7_t* vnf_p7, nfapi_vnf_p7_connection_i
nfapi_vnf_p7_connection_info_t* vnf_p7_connection_info_list_find(vnf_p7_t* vnf_p7, uint16_t phy_id)
{
nfapi_vnf_p7_connection_info_t* curr = vnf_p7->p7_connections;
while(curr != 0)
{
if(curr->phy_id == phy_id)
{
while (curr != 0) {
if (curr->phy_id == phy_id)
return curr;
}
curr = curr->next;
}
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s(): could not find P7 connection for phy_id %d\n", __func__, phy_id);
return 0;
}
......
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