In the sip router core these two attributes have different names:
* sval -> str
* ival -> i
---
modules/carrierroute/cr_fixup.c | 12 ++++++------
modules/carrierroute/cr_func.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/carrierroute/cr_fixup.c b/modules/carrierroute/cr_fixup.c
index eeda611..f832af4 100644
--- a/modules/carrierroute/cr_fixup.c
+++ b/modules/carrierroute/cr_fixup.c
@@ -129,12 +129,12 @@ static int carrier_fixup(void ** param) {
/* This is a name string, convert to a int */
((gparam_p)(*param))->type=GPARAM_TYPE_INT;
/* get carrier id */
- if ((id = carrier_name_2_id(&((gparam_p)(*param))->v.sval)) < 0) {
- LM_ERR("could not find carrier name '%.*s' in map\n",
((gparam_p)(*param))->v.sval.len, ((gparam_p)(*param))->v.sval.s);
+ if ((id = carrier_name_2_id(&((gparam_p)(*param))->v.str)) < 0) {
+ LM_ERR("could not find carrier name '%.*s' in map\n",
((gparam_p)(*param))->v.str.len, ((gparam_p)(*param))->v.str.s);
pkg_free(*param);
return -1;
}
- ((gparam_p)(*param))->v.ival = id;
+ ((gparam_p)(*param))->v.i = id;
}
return 0;
}
@@ -160,12 +160,12 @@ static int domain_fixup(void ** param) {
/* This is a name string, convert to a int */
((gparam_p)(*param))->type=GPARAM_TYPE_INT;
/* get domain id */
- if ((id = domain_name_2_id(&(((gparam_p)(*param))->v.sval))) < 0) {
- LM_ERR("could not find domain name '%.*s' in map\n",
((gparam_p)(*param))->v.sval.len, ((gparam_p)(*param))->v.sval.s);
+ if ((id = domain_name_2_id(&(((gparam_p)(*param))->v.str))) < 0) {
+ LM_ERR("could not find domain name '%.*s' in map\n",
((gparam_p)(*param))->v.str.len, ((gparam_p)(*param))->v.str.s);
pkg_free(*param);
return -1;
}
- ((gparam_p)(*param))->v.ival = id;
+ ((gparam_p)(*param))->v.i = id;
}
return 0;
}
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index d6406c9..451e2cc 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -80,7 +80,7 @@ static inline int cr_gp2id(struct sip_msg *_msg, gparam_t *gp, struct
name_map_t
switch (gp->type) {
case GPARAM_TYPE_INT:
- return gp->v.ival;
+ return gp->v.i;
break;
case GPARAM_TYPE_PVE:
/* does this PV hold an AVP? */
--
1.5.6.5