[Devel] CVS commitlog: sip-server fifo_server.c main.c sr_module.c
tcp_init.h tcp_main.c
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Fri Jul 29 20:38:44 CEST 2005
Hi everybody,
I just fixed a trick bug. There are modules which needs to fork
processes from init_child() - why init_child and not mod_init()? because
the sockets are initialized after mod_init() and these forked processed
required the sockets to be sent in order to send SIP messages (like sms
ans jabber modules).
What was the problem ? In order to fork only once from init_child(), the
module was relying on the child rank for uniqueness - worker rank 1 was
used since is the only one guaranteed to be created in fork or not fork
scenarios. The problem was that the rank was unique only per listening
interface, but not global:
3 interfaces, 2 children -> ranks will be 1,2 , 1,2 , 1,2
this was leading to more than one fork :(.
Affected modules were: cpl-c, jabber, sms.
Now the worker's ranks are globally unique:
3 interfaces, 2 children -> ranks will be 1,2 , 3,4 , 5,6
this change does not affect the special type ranks (like tcp, main,
timer, fifo, etc).
regards,
bogdan
Bogdan-Andrei Iancu wrote:
>User: bogdan_iancu
>Date: 2005/07/29 11:19:45 PDT
>
> OpenSER CVS - Commit Details
>
> Modified files:
> . fifo_server.c main.c sr_module.c
> tcp_init.h tcp_main.c
> Commit Log:
> -bug fix in assigning ranks to child processes: between the workers, the ranks
> must be unique; so far, the ranks were unique only per listening interface,
> leading to bad initialisation of some module.
>
> Revision Changes Path
> 1.4 +3 -5 sip-server/fifo_server.c
> [ http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/fifo_server.c?r1=1.3&r2=1.4 ]
> 1.2 +15 -17 sip-server/main.c
> [ http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/main.c?r1=1.1&r2=1.2 ]
> 1.2 +31 -65 sip-server/sr_module.c
> [ http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/sr_module.c?r1=1.1&r2=1.2 ]
> 1.2 +2 -2 sip-server/tcp_init.h
> [ http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/tcp_init.h?r1=1.1&r2=1.2 ]
> 1.4 +4 -3 sip-server/tcp_main.c
> [ http://cvs.sourceforge.net/viewcvs.py/openser/sip-server/tcp_main.c?r1=1.3&r2=1.4 ]
>
>_______________________________________________
>Devel mailing list
>Devel at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/devel
>
>
>
More information about the Devel
mailing list