[OpenSIPS-Devel] [ opensips-Bugs-2091771 ] presence module segfault if db_url not set

SourceForge.net noreply at sourceforge.net
Tue Sep 9 15:14:01 CEST 2008


Bugs item #2091771, was opened at 2008-09-03 20:00
Message generated for change (Comment added) made by anca_vamanu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2091771&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.4.x
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Kobi Eshun (ekobi)
Assigned to: Anca Vamanu (anca_vamanu)
Summary: presence module segfault if db_url not set

Initial Comment:
In my testing, get_db_subs_auth() crashes when it attempts to invoke pa_dbf.use_table(), which is not defined if db_url parameter has not been set. I see similar code in many other places in the presence module.

The workaround is obviously to always set the db_url parameter. Cheers,
--
kobi

----------------------------------------------------------------------

>Comment By: Anca Vamanu (anca_vamanu)
Date: 2008-09-09 13:14

Message:
Hi,

A cache only mode is not possible, as the presence module can not keep in
cache the information from watchers table - storing the presence status of
all the presentities for which it received subscriptions. Also in a
configuration with xcap permission rules, the database is used as an
interface.
Therefore, I have just made the usage safe, not permitting the call of
handle_subscribe and handle_publish functions if db_url is not set.

regards,
Anca Vamanu  

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-09-09 09:36

Message:
Hello,

The presence module is not build to work with cache only storage. You can
load the presence module and not set the db_url when you require the module
as a library, using some functions exported by it to be used in other
modules( like the rls module does). And in this case you do not call the
exported functions handle_subscribe and handle_publish. 
I am thinking of adding a cache only possibility.

regards,
Anca Vamanu



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2091771&group_id=232389



More information about the Devel mailing list