[OpenSIPS-Devel] [ opensips-Patches-3607182 ] Fix handling PUBLISH with Expires 0

SourceForge.net noreply at sourceforge.net
Tue Mar 19 14:07:14 CET 2013


Patches item #3607182, was opened at 2013-03-07 04:30
Message generated for change (Comment added) made by saghul
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3607182&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.9.x
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: saghul (saghul)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix handling PUBLISH with Expires 0

Initial Comment:
This is another approach to fix handling a PUBLISH with Expires 0. I committed r 9351 to fix it, but apparently other places of the code / modules rely on a specific behavior so it was reverted.

If RLS is being used, for example, all users subscribed to A need to somehow know when user A is offline. Assuming there is no automagic offline body generation nor PIDF manipulation in use, this will be known when they get an empty NOTIFY. The current code sends a NOTIFY with the last known state when the PUBLISH with Expires 0 is received, but *before* removing the body from the DB, which means that user A's subscribers will never get an empty NOTIFY thus allowing them to know the user is offline.

The attached patch fixes this by sending another NOTIFY right after updating the DB, so this time, if there are no more bodies stored, the empty NOTIFY will be sent. If PIDF manipulation was enabled, it would be sent along with this second NOTIFY.

Does this approach look good? It does solve the problem I was trying to solve in the first place, and I don't think there are other side effects.

Please let me know if it's ok if I commit this, I'm working on some other PIDF manipulation related fix which is waiting for this one to go in :-)


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

>Comment By: saghul (saghul)
Date: 2013-03-19 06:07

Message:
Applied to trunk on r9918 and 1.9 branch on r9920.

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

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



More information about the Devel mailing list