diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-08-10 17:56:05 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-08-10 17:56:05 +0000 |
commit | 5ff199d99a64c32385eb340a48980400c45234cb (patch) | |
tree | 915674a5300c30fd8ecf4ce3f623c991816fb7e1 /channels/chan_sip.c | |
parent | cb525e5c384e4522637ab27501c1733e496406c3 (diff) |
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index db3cab86e..eaaffebae 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15830,7 +15830,10 @@ static int extensionstate_update(const char *context, const char *exten, struct 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; |