Module: sip-router
Branch: master
Commit: 26f757d0c30db79c92011313e72c6c1d97e64cd0
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=26f757d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Mar 24 23:06:17 2011 +0100
tm: enforce AVP_TRACK_TO only for ser-style timer AVPs
- ser used the list of AVPs from track To for geting timer values
- kamailio is using mainly track From for AVPs
- for compatibility reasons, if avp name is given in ser style, enforce
AVPs track To, otherwise use default track (From) if none is specified
- reported by Min Wang
---
modules/tm/t_funcs.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index 13e3952..1b43cc1 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -431,6 +431,8 @@ int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param,
"AVP specs \"%s\"\n", fr_timer_param);
return -1;
}
+ /* ser flavour uses the To track of AVPs */
+ fr_timer_avp_type |= AVP_TRACK_TO;
}
}
@@ -462,6 +464,8 @@ int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param,
"AVP specs \"%s\"\n", fr_inv_timer_param);
return -1;
}
+ /* ser flavour uses the To track of AVPs */
+ fr_inv_timer_avp_type |= AVP_TRACK_TO;
}
}
@@ -507,7 +511,7 @@ static inline int avp2timer(unsigned int* timer, int type, int_str name)
int_str val_istr;
int err;
- avp = search_first_avp( type | AVP_TRACK_TO, name, &val_istr, 0);
+ avp = search_first_avp(type, name, &val_istr, 0);
if (!avp) {
/*
DBG("avp2timer: AVP '%.*s' not found\n", param.s->len, ZSW(param.s->s));
Hi,
we are encountering weird error with "non existing right pvar" -
unexpectedly and we have already given up to debug it normally (calls are
ended by Forbidden). We would like to adjust the code, to get the specific
line of configuration file, where this occurs. Running kamailio with debug
parameters is not acceptable, as we have too many calls and searching for
the error would last some time ...
Could you somebody please help me to adjust this code (lvalue.c) , that
could give us some additional information except for "non existing right
pvar" thing in syslog? line of conf file, or simply the name of the variable
assigned, value, etc. Thank you.
Error msg is generated on the line 351, and maybe 207, really don't know.
lvalue.c:207
}else{
/* non existing pvar */
/* on error, keep the type of the assigned
avp, but
reset it to an empty value */
AVP_ASSIGN_NOVAL();
ret=0;
}
break;
lvalue.c:351
}else{
ERR("non existing right pvar\n");
PVAR_ASSIGN_NOVAL();
ret=-1;
}
break;
today i compiled sip router from master and got this:
CC (cc) [M sqlops.so] sqlops.o
sqlops.c: In function ‘sql_xquery’:
sqlops.c:201: warning: passing argument 3 of ‘sql_do_xquery’ from incompatible pointer type
sql_api.h:77: note: expected ‘struct pv_elem_t *’ but argument is of type ‘char *’
please fix.
-- juha