[SR-Dev] git:master: * Moved lcr module from modules_k to modules and removed it from modules_s .

Daniel-Constantin Mierla miconda at gmail.com
Mon May 11 09:34:10 CEST 2009


Hello,

On 05/10/2009 01:38 PM, Andrei Pelinescu-Onciul wrote:
> On May 10, 2009 at 13:26, Juha Heinanen <jh at tutpro.com> wrote:
>   
>> Andrei Pelinescu-Onciul writes:
>>
>>  >  - possible wrong db init from all the processes (see 8fb14f, 9961e8)
>>
>> k only has these ranks:
>>
>> #define PROC_MAIN      0  /* Main Kamailio process */
>> #define PROC_TIMER    -1  /* Timer attendant process */
>> #define PROC_TCP_MAIN -4  /* TCP main process */
>>
>> whereas sr has these:
>>
>> #define PROC_MAIN      0  /* Main ser process */
>> #define PROC_TIMER    -1  /* Timer attendant process */
>> #define PROC_RPC      -2  /* RPC type process */
>> #define PROC_FIFO      PROC_RPC  /* FIFO attendant process */
>> #define PROC_TCP_MAIN -4  /* TCP main process */
>> #define PROC_UNIXSOCK -5  /* Unix socket server */
>> #define PROC_ATTENDANT -10  /* main "attendant process */
>> #define PROC_INIT     -127 /* special rank, the context is the main ser
>>
>> which rank should i test in child_init if i want db to be initialized
>> only by process that executes mi commands?
>>     
>
> I don't know  :-)
>
> Theoretically it should be PROC_RPC, but I'm not sure the kamailio mi
> transport modules really work, or need some "porting".
>   

MI works now. I have been tested it a lot with fifo so far.
> A quick grep on mi_xmlrpc showed that fork_process use 100 as rank.
>   

It is 100, indeed for fifo. Checking the code, I think has to be 
PROC_NOCHILDINIT because the MI calls a different child init function 
that is added in the mi_export_t structure. Therefore module's child 
init should not be called for MI processes.

Cheers,
Daniel

> I think it should use PROC_RPC (anyway something special, meaning not a
> positive number).
>
> Daniel?
>
> Andrei
>   

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




More information about the sr-dev mailing list