[Devel] setting the AVP value from within C code (module)

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Jun 20 18:52:34 CEST 2006


Hi Ron,

see in the usr_avp.h file, the
    int add_avp( unsigned short flags, int_str name, int_str val);
function.

regards,
bogdan

Ron Winacott wrote:

>Hello all,
>	I have the need to set the value of an AVP from within a modules C 
>code. I have the xl_spec/name of the AVP I need to set. I know how to 
>get the value, (xl_get_spec_value(...)) but I can't found anywhere in 
>the code where I can set the value. The value type in my case is an 
>int so I should not have a memory allocation/reallocation problem.
>
>Can I just get the value (reference to it) and "blast" in the new 
>value?
>
>int NewValue = 42;
>...
>xl_get_spec_value( req, spec, &xl_val, 0);
>xl_val.ri = NewValue;
>...
>
>And if this is the case, how do I deal with a str(ing) AVP value?
>
>Thanks
>	ronw
>
>---
>Ron Winacott 
>Chaos, panic and disorder...my work here is done.
>
>_______________________________________________
>Devel mailing list
>Devel at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/devel
>
>  
>




More information about the Devel mailing list