mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@398580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user