[svn-commits] mmichelson: trunk r371113 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 10 12:56:10 CDT 2012


Author: mmichelson
Date: Fri Aug 10 12:56:05 2012
New Revision: 371113

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371113
Log:
Fix a comparison that was causing presence tests to fail.

A recent change made it so that device state changes that were
not actual "changes" would not get reported to subscribers. The
problem was that this inadvertently blocked presence updates as
well.


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=371113&r1=371112&r2=371113
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Aug 10 12:56:05 2012
@@ -15830,7 +15830,10 @@
 	default:	/* Tell user */
 		if (force) {
 			/* we must skip the next two checks for a queued state change or resubscribe */
-		} else if (p->laststate == data->state && (~data->state & AST_EXTENSION_RINGING)) {
+		} else if ((p->laststate == data->state && (~data->state & AST_EXTENSION_RINGING)) &&
+				(p->last_presence_state == data->presence_state &&
+					!strcmp(p->last_presence_subtype, data->presence_subtype) &&
+					!strcmp(p->last_presence_message, data->presence_message))) {
 			/* don't notify unchanged state or unchanged early-state causing parties again */
 			sip_pvt_unlock(p);
 			return 0;




More information about the svn-commits mailing list