diff --git a/modules/presence/presence.c b/modules/presence/presence.c index 067a1e1..2858461 100644 --- a/modules/presence/presence.c +++ b/modules/presence/presence.c @@ -414,6 +414,12 @@ static int child_init(int rank) { if (rank==PROC_INIT || rank==PROC_TCP_MAIN) return 0; + + pid = my_pid(); + + if(library_mode) + return 0; + if (rank == PROC_MAIN) { @@ -438,11 +444,6 @@ static int child_init(int rank) return 0; } - pid = my_pid(); - - if(library_mode) - return 0; - if (pa_dbf.init==0) { LM_CRIT("child_init: database not bound\n");