Browse code

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

Daniel-Constantin Mierla authored on 03/07/2009 18:19:47
Showing 1 changed files
... ...
@@ -1041,11 +1041,11 @@ int km_parse_avp_spec( str *name, int *type, int_str *avp_name)
1041 1041
 
1042 1042
 	p = (char*)memchr((void*)name->s, ':', name->len);
1043 1043
 	if (p==NULL) {
1044
-		/* it's an avp alias */
1045
-		return lookup_avp_galias( name, type, avp_name);
1046
-	} else {
1047
-		return parse_avp_name( name, type, avp_name, &index);
1044
+		/* might be kamailio avp alias or ser avp name style */
1045
+		if(lookup_avp_galias( name, type, avp_name)==0)
1046
+			return 0; /* found */
1048 1047
 	}
1048
+	return parse_avp_name( name, type, avp_name, &index);
1049 1049
 }
1050 1050
 
1051 1051