diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-09-06 21:23:02 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-09-06 21:23:02 +0000 |
commit | 0bed76989a4dada80a2ed8b764e014d7e8851e7c (patch) | |
tree | 154bdc4087d3d992d9192f3a0adad209d526cc2a /res | |
parent | 5396198f167e8e05e6b546868035ea8f7dc9893a (diff) |
Multiple revisions 398558,398577
........
r398558 | kmoore | 2013-09-06 14:28:16 -0500 (Fri, 06 Sep 2013) | 17 lines
Fix Jabber/XMPP distributed MWI
The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.
(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
........
Merged revisions 398523 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r398577 | kmoore | 2013-09-06 16:00:56 -0500 (Fri, 06 Sep 2013) | 10 lines
Commit the remainder of r398523
This is a missing part of the commit in revision 398523 that corrects
the name of a variable.
(issue ASTERISK-22435)
........
Merged revisions 398576 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398558,398577 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398580 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_jabber.c | 6 | ||||
-rw-r--r-- | res/res_xmpp.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index 0e41cdf77..b534e803b 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -3330,7 +3330,7 @@ static void aji_init_event_distribution(struct aji_client *client) */ static int aji_handle_pubsub_event(void *data, ikspak *pak) { - char *item_id, *device_state, *context, *cachable_str; + char *item_id, *device_state, *mailbox, *cachable_str; int oldmsgs, newmsgs; iks *item, *item_content; struct ast_eid pubsub_eid; @@ -3359,11 +3359,11 @@ static int aji_handle_pubsub_event(void *data, ikspak *pak) &pubsub_eid); return IKS_FILTER_EAT; } else if (!strcasecmp(iks_name(item_content), "mailbox")) { - context = strsep(&item_id, "@"); + mailbox = strsep(&item_id, "@"); sscanf(iks_find_cdata(item_content, "OLDMSGS"), "%10d", &oldmsgs); sscanf(iks_find_cdata(item_content, "NEWMSGS"), "%10d", &newmsgs); - ast_publish_mwi_state_full(item_id, context, newmsgs, oldmsgs, NULL, &pubsub_eid); + ast_publish_mwi_state_full(mailbox, item_id, newmsgs, oldmsgs, NULL, &pubsub_eid); return IKS_FILTER_EAT; } else { diff --git a/res/res_xmpp.c b/res/res_xmpp.c index 1a3ccd3a6..e4ecd44ec 100644 --- a/res/res_xmpp.c +++ b/res/res_xmpp.c @@ -1450,7 +1450,7 @@ static void xmpp_pubsub_subscribe(struct ast_xmpp_client *client, const char *no */ static int xmpp_pubsub_handle_event(void *data, ikspak *pak) { - char *item_id, *device_state, *context, *cachable_str; + char *item_id, *device_state, *mailbox, *cachable_str; int oldmsgs, newmsgs; iks *item, *item_content; struct ast_eid pubsub_eid; @@ -1478,11 +1478,11 @@ static int xmpp_pubsub_handle_event(void *data, ikspak *pak) &pubsub_eid); return IKS_FILTER_EAT; } else if (!strcasecmp(iks_name(item_content), "mailbox")) { - context = strsep(&item_id, "@"); + mailbox = strsep(&item_id, "@"); sscanf(iks_find_cdata(item_content, "OLDMSGS"), "%10d", &oldmsgs); sscanf(iks_find_cdata(item_content, "NEWMSGS"), "%10d", &newmsgs); - ast_publish_mwi_state_full(item_id, context, newmsgs, oldmsgs, NULL, &pubsub_eid); + ast_publish_mwi_state_full(mailbox, item_id, newmsgs, oldmsgs, NULL, &pubsub_eid); return IKS_FILTER_EAT; } else { |