Module: kamailio
Branch: master
Commit: 4fc2e109391ffef98059b517f8fbdc2523c0651f
URL:
https://github.com/kamailio/kamailio/commit/4fc2e109391ffef98059b517f8fbdc2…
Author: Federico Favaro <federico(a)aereo.lan.athonet.com>
Committer: Federico Favaro <federico(a)aereo.lan.athonet.com>
Date: 2015-07-08T15:41:21+02:00
Fix cdp routing for Rx interface
Avoid to force vendor_id to zero
if Auth_Application_Id or Acct_Application_Id AVPs
---
Modified: modules/cdp/routing.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4fc2e109391ffef98059b517f8fbdc2…
Patch:
https://github.com/kamailio/kamailio/commit/4fc2e109391ffef98059b517f8fbdc2…
---
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);
}