#22 presence module segfault if db_url not set

modules (454)
Kobi Eshun

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,


  • Bogdan-Andrei Iancu

    • priority: 5 --> 7
    • assigned_to: nobody --> anca_vamanu
    • status: open --> open-accepted
  • Nobody/Anonymous


    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.

    Anca Vamanu

  • Anca Vamanu

    Anca Vamanu - 2008-09-09


    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.

    Anca Vamanu

  • Anca Vamanu

    Anca Vamanu - 2008-09-09
    • status: open-accepted --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks