Skip to content

Commit

Permalink
cdp: b/f: Exit loop, if there is no avp->next (bug introduced in bac9707
Browse files Browse the repository at this point in the history
)
  • Loading branch information
carstenbock committed Jul 10, 2015
1 parent 728e52f commit 158ffa1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/cdp/peerstatemachine.c
Expand Up @@ -715,6 +715,8 @@ void save_peer_applications(peer *p,AAAMessage *msg)
vendor = get_4bytes(avp_vendor->data.s);
LM_DBG("Found Supported Vendor for Application %i: %i\n", DP_AUTHORIZATION, vendor);
add_peer_application(p,id,vendor,DP_AUTHORIZATION);
if (!avp_vendor->next)
break;
avp_vendor = AAAFindMatchingAVP(msg,avp_vendor->next,AVP_Supported_Vendor_Id,0,0);
}
break;
Expand All @@ -726,6 +728,8 @@ void save_peer_applications(peer *p,AAAMessage *msg)
vendor = get_4bytes(avp_vendor->data.s);
LM_DBG("Found Supported Vendor for Application %i: %i\n", DP_ACCOUNTING, vendor);
add_peer_application(p,id,vendor,DP_ACCOUNTING);
if (!avp_vendor->next)
break;
avp_vendor = AAAFindMatchingAVP(msg,avp_vendor->next,AVP_Supported_Vendor_Id,0,0);
}
break;
Expand Down

0 comments on commit 158ffa1

Please sign in to comment.