#323 Presence module: fallback2db setting broken

1.6.x
closed-invalid
nobody
modules (454)
5
2010-12-03
2010-11-01
No

Hello,

I have noticed that the fallback2db option of presence module is not honored when a record is found in presence hash table. After checking the code, I found in presence/notify.c, in function get_p_notify_body() that if search_phtable() does not return NULL in line 989 (record found) the result is discarded and the search is done in database. On the contrary, if there is no record in hash, no search is made in db.

I will try to come up with a patch but I am still trying to understand the code...

Regards,
Vallimamod Abdullah
.

Discussion

  • Vallimamod Abdullah

    Actually, to correct myself, the search in DB is indeed made when no record is found in hash and fallback2db enabled. But when there is a record in hash table and fallback2db is disabled, the DB is still searched, which is not the expected behaviour.

     
  • Anca Vamanu

    Anca Vamanu - 2010-11-02
    • status: open --> closed-invalid
     
  • Anca Vamanu

    Anca Vamanu - 2010-11-02

    Hi Vallimamod,

    "But when there is a record in hash table and fallback2db is disabled, the DB is still searched, which is
    not the expected behavior."

    The hash tables for publish info contains only an indication if the record exists in database, but it does not store the body. So the search in database must be made even if fallback2db is not set. The publish hash table, for when fallback2db is not set, says only if searches need to be done in database or not.

    Regards,

     
  • Vallimamod Abdullah

    Thanks for the precision Anca.
    I came to the same conclusion after reading the code in more details.

    Regards,
    Vallimamod
    .

     
  • Vallimamod Abdullah

    • status: closed-invalid --> open-invalid
     
  • Anca Vamanu

    Anca Vamanu - 2010-12-03
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks