Hello,
On 9/27/12 5:21 PM, Peter Dunkley wrote:
Hi,
This kind-of makes sense because the pua module only deals with one table, when using a normal DB module, having set the table name once you never need to do it again.
when dealing with a direct connection to db, this is ok, because the module has a db-link structure where it keeps the table name. But the db_cluster is intermediate layer to several link structures which can be used from many modules.
If db_cluster() is different perhaps it'd be good to make it explicitly check for this and log an error in this case?
The pua DB is accessed in several different files so if this change is made all files will need to be checked and updated.
Yes, use table should be enforced before any query in any module, being the safest way. There were some troubles in the past with modules using many tables as well.
Setting the table is just and assignment with a direct connection db module.
Cheers, Daniel
Regards,
Peter
On Thu, 2012-09-27 at 17:14 +0200, Daniel-Constantin Mierla wrote:
Hello,
a quick look over the pua_db.c file shows that dbf.use_table(...) is not used before doing the queries. That is required for db_cluster. Perhaps someone that is able to test the module can add the fix quickly -- I cannot do it for the next few days.
Cheers, Daniel
On 9/27/12 4:58 PM, Juha Heinanen wrote:
Peter Dunkley writes:
From a quick look at the code this could happen if the table name or
length was a bad pointer.
peter,
i didn't change table names when i turned on cluster. i just changed this:
modparam("pua", "db_url", "cluster://pres_serv_cluster")
crash happens on timer before presence server has got any requests.
without db_cluster, presence works fine. have you tried presence with db_cluster?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org mailto:sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Peter Dunkley Technical Director Crocodile RCS Ltd