[asterisk-commits] mjordan: trunk r381615 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Feb 16 10:28:47 CST 2013
Author: mjordan
Date: Sat Feb 16 10:28:43 2013
New Revision: 381615
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381615
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)
........
Merged revisions 381613 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=381615&r1=381614&r2=381615
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Feb 16 10:28:43 2013
@@ -14531,7 +14531,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 asterisk-commits
mailing list