Module: kamailio
Branch: master
Commit: 3a6b221a4ccb910607a0a893efb9e759f8d17012
URL:
https://github.com/kamailio/kamailio/commit/3a6b221a4ccb910607a0a893efb9e75…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-30T12:35:10+02:00
Merge pull request #238 from athonet-open/fix_cdp_routing_rx_interface
cdp: Fix cdp routing for Rx interface
---
Modified: modules/cdp/routing.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3a6b221a4ccb910607a0a893efb9e75…
Patch:
https://github.com/kamailio/kamailio/commit/3a6b221a4ccb910607a0a893efb9e75…
---
diff --git a/modules/cdp/routing.c b/modules/cdp/routing.c
index 31b03e3..81db889 100644
--- a/modules/cdp/routing.c
+++ b/modules/cdp/routing.c
@@ -193,16 +193,14 @@ peer* get_routing_peer(cdp_session_t* cdp_session, AAAMessage *m) {
avp_vendor = AAAFindMatchingAVP(m, 0, AVP_Vendor_Id, 0, AAA_FORWARD_SEARCH);
avp = AAAFindMatchingAVP(m, 0, AVP_Auth_Application_Id, 0, AAA_FORWARD_SEARCH);
- if (avp) {
- if (avp_vendor) vendor_id = get_4bytes(avp_vendor->data.s);
- else vendor_id = 0;
+ if (avp && avp_vendor) {
+ vendor_id = get_4bytes(avp_vendor->data.s);
app_id = get_4bytes(avp->data.s);
}
avp = AAAFindMatchingAVP(m, 0, AVP_Acct_Application_Id, 0, AAA_FORWARD_SEARCH);
- if (avp) {
- if (avp_vendor) vendor_id = get_4bytes(avp_vendor->data.s);
- else vendor_id = 0;
+ if (avp && avp_vendor) {
+ vendor_id = get_4bytes(avp_vendor->data.s);
app_id = get_4bytes(avp->data.s);
}