[Kamailio-Devel] SF.net SVN: openser:[5130] trunk/mod_fix.h

Daniel-Constantin Mierla miconda at gmail.com
Fri Oct 24 11:30:19 CEST 2008



On 10/24/08 12:21, Henning Westerholt wrote:
> On Friday 24 October 2008, Daniel-Constantin Mierla wrote:
>   
>>> Revision: 5130
>>>           http://openser.svn.sourceforge.net/openser/?rev=5130&view=rev
>>> Author:   henningw
>>> Date:     2008-10-24 08:33:05 +0000 (Fri, 24 Oct 2008)
>>>
>>> Log Message:
>>> -----------
>>> - add AVP type to gparam_t, to make this usable for carrierroute
>>>       
>> this should not be necessary. pv_spec_t can handle the avp naming. The
>> avp is just another PV. What is the particular use case for you? Maybe I
>> can help showing how to use the pv_spec_t as avp for it.
>>     
>
> Hi Daniel,
>
> yes, i know. But we've some performance concerns regards to printing the PV 
> for every invocation of this function, when an AVP is used most of the time. 
> Do you think this is no problem?
>   
if that is a concern for you, you can get the name and then use it as 
AVP. The pv_spec_t has inside the new fields you added
http://www.asipto.com/pub/kamailio-devel-guide/#c11pv_name_t

Moreover, there is a function that gets the avp name out of pv_spec_t, 
for the case the avp name is dynamic, e.g., $avp($var(avpname)), see 
pv_get_avp_name() in pvar.c

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list