[sr-dev] current running action

Daniel-Constantin Mierla miconda at gmail.com
Mon Jan 25 12:19:30 CET 2010


Hello,

On 1/22/10 2:10 PM, Andreea Ancuta Onofrei wrote:
> Hi Henning,
>
> I was referring to the current struct action element runned by the
> thread. I would like to use t_suspend function to suspend a thread and
> after a time duration expires use the t_continue function with the param
> action set to the next action that the thread was supposed to run.
>
> We will use this to prioritize the SIP traffic on the P-CSCF. If you
> have other ideas that could suite this purpose, feel free to share.
>    

i think the current design for t_suspend is to provide a route name from 
where to resume.

However, the only way that could be a solution for what you want is to 
look what pointer is given as parameter -- if it is a member of the 
action structure, then you can get it by computing the offset to start 
of structure relative to it. Sure you can do it in the fixup function 
(therefore you need at least one parameter to your function).

Cheers,
Daniel

>
> Best regards,
> Ancuta
>
> On Fri, 2010-01-22 at 13:30 +0100, Henning Westerholt wrote:
>    
>> On Friday 22 January 2010, Andreea Ancuta Onofrei wrote:
>>      
>>> Is it possible to retrieve the current action that sip-router is
>>> running?
>>>
>>> Best regards,
>>> Ancuta
>>>        
>> Hi Andreea,
>>
>> hm, what actions do you refer to? Each running process can execute actions
>> independently. If you enable debugging then you'll get in the log files
>> informations about the executed actions in the core and modules, on a low
>> level. If you only want to get informations about the state of configuration
>> script execution, you could just use the xlog module to output informations.
>>
>> Cheers,
>>
>> Henning
>>      
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>    

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




More information about the sr-dev mailing list