[svn-commits] mjordan: branch 11 r381613 - /branches/11/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Feb 16 10:22:41 CST 2013


Author: mjordan
Date: Sat Feb 16 10:22:37 2013
New Revision: 381613

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381613
Log:
Don't send presencestate information if the state is invalid

Previously, presencestate information was sent whenever the state was not
NOT_SET. When r381594 actually returned INVALID presence state in all the
places it was supposed to, it caused chan_sip to start adding presence
state information to NOTIFY requests that it previously would not have
added. chan_sip shouldn't be adding presence state information when the
provider is in an invalid state; users can't set the state to invalid and
an invalid state always implies that the provider is in an error condition.

(issue AST-1084)


Modified:
    branches/11/channels/chan_sip.c

Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=381613&r1=381612&r2=381613
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Sat Feb 16 10:22:37 2013
@@ -14440,7 +14440,8 @@
 		else
 			ast_str_append(tmp, 0, "<status><basic>%s</basic></status>\n", (local_state != NOTIFY_CLOSED) ? "open" : "closed");
 
-		if (allow_notify_user_presence(p) && (data->presence_state > 0)) {
+		if (allow_notify_user_presence(p) && (data->presence_state != AST_PRESENCE_INVALID)
+				&& (data->presence_state != AST_PRESENCE_NOT_SET)) {
 			ast_str_append(tmp, 0, "</tuple>\n");
 			ast_str_append(tmp, 0, "<tuple id=\"digium-presence\">\n");
 			ast_str_append(tmp, 0, "<status>\n");




More information about the svn-commits mailing list