Re: Logic behind check of current_turn in presence module?
This question is more appropriate for the devel mailing list :).
The "turns" is a mechanism to force OpenSIPS to process the PUBLISH
requests in the some order as they were received. OpenSIPS is a
multi-processes application and requests received in a certain order
from the network level may end up being processed in a totally different
one. This was breaking the whole presence philosophy, especially in
dialog-info, where the PUBLISH-ing is done fast and order is really
The two variables are used as a ticketing system for order - each
incoming PUBLISH will take a turn ticket (based on its arrival) and it
will wait to be handled only when all the previously received PUBLISHes
> Hi All,
> Here I am referring opensips1.8.4
> I am not able to understand the use of current_turn and last_turn variables
> in update_presentity function.
> As I understand:
> For initial request current_turn=0 and last_turn=0
> and for subsequent requests where etag matches and found in hash, each will
> be incremented by 1.
> I have two questions:
> 1. What is the use of this check?
> 2. When will be the current_turn and last_turn become unequal?
> Also, I see this was not present in the version 1.8.3.
> Please help me understanding the logic behind this functionality.
> Thanks & Regards
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Logic-behind-check-of-current-turn-in-presence-module-tp7598940.html > Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
> Users mailing list
> [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >