[Serusers] RE: SER in debug mode

Jan Janak jan at iptel.org
Wed Nov 3 17:08:24 CET 2004


no fork mode means that there will be only one process listening for and
processing SIP messages. In addition to that there will be also the
timer process (taking care of timers) and fifo process (processing
commands sent to ser over the FIFO interface). The child init function
will be called for all of them. See:

root at localhost:/home/janakj# serctl ps
0       6266    stand-alone receiver @ 127.0.0.1:5060
1       6267    timer
2       6268    fifo server

If you want to execute the code in the listening process only, then you
can ignore calls of child_init that have the parameter set to PROC_TIMER
and PROC_FIFO (defined in sr_module.h).

Note that it is usually a good idea to have the same environment in the
timer process as in the receiver as some functionality might be called
from the timer.

  Jan.

On 03-11 10:14, Gandhi, Jignesh wrote:
> Hello all,
> 
> I am trying to debug a new module that I have written.
> So I have set fork=no and debug=4 and commented out the
> child line. 
> 
> The question I have is that the how may times the child_init() 
> function be called ?
> 
> 
> The child_init() function in my module sets up a socket connection
> to a server and I can see that the child_init() function is getting
> called 3 times. I do not understand this. Am I missing something ?
> 
> The mod_init function is getting called only once, like it is supposed to.
> 
> I have attached the output from ser startup. The module that I have written 
> is called gl.
> 
> Nov  2 14:07:20 sara ser: INFO: glenayre redirector(gl module) initializing
> Nov  2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is initially 65535
> Nov  2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is finally 262142
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-1 / pid
> <10269>
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost
> Nov  2 14:07:20 sara ser: INFO: fifo process starting: 10270
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-2 / pid
> <10270>
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost
> Nov  2 14:07:20 sara ser: SER: open_uac_fifo: fifo server up at
> /tmp/ser_fifo...
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #1 / pid
> <10268>
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov  2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost
> 
> any help is appreciated,
> 
> thanks,
> Jignesh Gandhi
> Software Engineer II
> Jignesh.Gandhi at glenayre.com
> 
> 
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list