Module: sip-router Branch: master Commit: 9c77d5329b45a493b741527bc8902456dbf51e7e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9c77d532...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Jul 3 20:19:47 2009 +0200
core: km_parse_avp_spec() update
- fallback to ser style of avp name in $avp(id) if 'id' has no ':' and there is no avp alias defined - behavior was changed when I added support for K compatible avp aliases in pv module - issue reported by Andrei Pelinscu-Onciul
---
usr_avp.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr_avp.c b/usr_avp.c index 6c06721..53f38e4 100644 --- a/usr_avp.c +++ b/usr_avp.c @@ -1041,11 +1041,11 @@ int km_parse_avp_spec( str *name, int *type, int_str *avp_name)
p = (char*)memchr((void*)name->s, ':', name->len); if (p==NULL) { - /* it's an avp alias */ - return lookup_avp_galias( name, type, avp_name); - } else { - return parse_avp_name( name, type, avp_name, &index); + /* might be kamailio avp alias or ser avp name style */ + if(lookup_avp_galias( name, type, avp_name)==0) + return 0; /* found */ } + return parse_avp_name( name, type, avp_name, &index); }