Hello,
the first change is not good because results in database connection
sharing across many processes and could end up on out of sync queries at
high volume of traffic.
The second one is recommended and is good for safety, so it can be added
anyhow. On the other hand, the connection can be opened from the
child_init() invoked for your new process -- I wrote in previous email
some more details about.
Cheers,
Daniel
On 04/09/14 00:38, Luis Azedo wrote:
Hi Daniel,
the issue that i'm having with calling pres_refresh_watchers (invalid
connection when it calls get_p_notify_body) from a forked process from
my module disappears if i comment the lines 411 e 412 in presence.c
411 // pa_dbf.close(pa_db);
412 // pa_db = NULL;
i can achieve the desired result if i leave these lines intact and add
these lines to pres_refresh_watchers
if(pa_db == NULL && library_mode == 0) {
pa_db = pa_dbf.init(&db_url);
}
the first change is more global and will keep me from adding the same
lines in (2) to other functions like update_watchers_status.
i would like to see either of these changes merged in master and ready
for 4.2.
with these changes and the db_text that i submitted earlier, i can
then ask to merge the main module db_kazoo into master.
Best
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 -
http://www.asipto.com
Sep 22-25, Berlin, Germany