[OpenSER-Users] OpenSER: AVP script flag bugs in 1.3 and trunk

Helmut Kuper helmut.kuper at ewetel.de
Fri Dec 14 12:04:04 CET 2007


Hello,

in openser 1.3 and current trunk the AVP script flags still not work as
expected. So here again the fixes I did to solve that problems in 1.3
and trunk:



...

Hi again,

further tests with avp and script_flags raised new problems. When I
write resp. set an AVP like "$avp(i1:10)=10; $avp(i2:10)=20;" and
checking them with "xlog('L_INFO', 'avp(i1:10) avp(i1:20)\n');" it leads
to "20 20" as output.

In file pvar.c in function pv_get_avp_name() I had to replace

*name_type = 0;

with

*name_type = ip->pvn.u.isname.type;


Then that worked.


- -.-


Additionally I fixed the Alias-Duplicate Problem when you do something
like avp_aliases("A=i1:10; B=i2:20");

In file usr_avp.c I had to change line 427 in function
check_avp_galias() from

type &= AVP_NAME_STR;

to

type &= (AVP_NAME_STR|AVP_SCRIPT_MASK);


- -.-

Then at last, if u want assign a value to an AVP-Alias which uses script
flags replace in file usr_avp.c in function add_avp_galias() around line
482 the line

ga->avp.type = type&AVP_NAME_STR;

with

ga->avp.type = type&(AVP_NAME_STR|AVP_SCRIPT_MASK);



regards
Helmut




More information about the Users mailing list