Module: kamailio
Branch: master
Commit: fd881df42e6fc041639539c3c32240bbc30d8ae1
URL:
https://github.com/kamailio/kamailio/commit/fd881df42e6fc041639539c3c32240b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-28T17:59:34+01:00
auth_radius: renamed import_all_avp to radius_avps_mode
- more suggestive that it is about radius avps, not the internal
kamailio avps
---
Modified: modules/auth_radius/authrad_mod.c
Modified: modules/auth_radius/authrad_mod.h
Modified: modules/auth_radius/sterman.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fd881df42e6fc041639539c3c32240b…
Patch:
https://github.com/kamailio/kamailio/commit/fd881df42e6fc041639539c3c32240b…
---
diff --git a/modules/auth_radius/authrad_mod.c b/modules/auth_radius/authrad_mod.c
index dbfaece..f4a9eac 100644
--- a/modules/auth_radius/authrad_mod.c
+++ b/modules/auth_radius/authrad_mod.c
@@ -65,7 +65,7 @@ static char* radius_config = DEFAULT_RADIUSCLIENT_CONF;
static int service_type = -1;
int use_ruri_flag = -1;
-int import_all_avp = 0;
+int ar_radius_avps_mode = 0;
static char *auth_extra_str = 0;
struct extra_attr *auth_extra = 0;
@@ -94,7 +94,7 @@ static param_export_t params[] = {
{"service_type", INT_PARAM, &service_type },
{"use_ruri_flag", INT_PARAM, &use_ruri_flag },
{"auth_extra", PARAM_STRING, &auth_extra_str },
- {"import_all_avp", INT_PARAM, &import_all_avp },
+ {"radius_avps_mode", INT_PARAM, &ar_radius_avps_mode },
{0, 0, 0}
};
diff --git a/modules/auth_radius/authrad_mod.h b/modules/auth_radius/authrad_mod.h
index 7795632..c6561d3 100644
--- a/modules/auth_radius/authrad_mod.h
+++ b/modules/auth_radius/authrad_mod.h
@@ -40,7 +40,7 @@ extern void *rh;
extern struct extra_attr *auth_extra;
extern int use_ruri_flag;
-extern int import_all_avp;
+extern int ar_radius_avps_mode;
extern auth_api_s_t auth_api;
diff --git a/modules/auth_radius/sterman.c b/modules/auth_radius/sterman.c
index da644dc..88eef1d 100644
--- a/modules/auth_radius/sterman.c
+++ b/modules/auth_radius/sterman.c
@@ -152,9 +152,9 @@ static int generate_avps(VALUE_PAIR* received)
LM_DBG("getting AVPs from RADIUS Reply\n");
vp = received;
- if ( ! import_all_avp )
+ if ( ! ar_radius_avps_mode )
vp=rc_avpair_get(vp,attrs[A_SIP_AVP].v,0);
- for( ; vp; vp=import_all_avp?vp->next:rc_avpair_get(vp->next,attrs[A_SIP_AVP].v,0)
) {
+ for( ; vp;
vp=((ar_radius_avps_mode)?vp->next:rc_avpair_get(vp->next,attrs[A_SIP_AVP].v,0)) )
{
flags = 0;
if (!extract_avp( vp, &flags, &name, &val)){
LM_ERR("error while extracting AVP
'%.*s'\n",(int)strlen(vp->name),vp->name);