[asterisk-commits] kmoore: branch 12 r398580 - in /branches/12: ./ res/res_jabber.c res/res_xmpp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 6 16:17:26 CDT 2013


Author: kmoore
Date: Fri Sep  6 16:17:24 2013
New Revision: 398580

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398580
Log:
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

Modified:
    branches/12/   (props changed)
    branches/12/res/res_jabber.c
    branches/12/res/res_xmpp.c

Propchange: branches/12/
------------------------------------------------------------------------------
    (empty)

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_jabber.c?view=diff&rev=398580&r1=398579&r2=398580
==============================================================================
--- branches/12/res/res_jabber.c (original)
+++ branches/12/res/res_jabber.c Fri Sep  6 16:17:24 2013
@@ -3330,7 +3330,7 @@
  */
 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 @@
 						&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 {

Modified: branches/12/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_xmpp.c?view=diff&rev=398580&r1=398579&r2=398580
==============================================================================
--- branches/12/res/res_xmpp.c (original)
+++ branches/12/res/res_xmpp.c Fri Sep  6 16:17:24 2013
@@ -1450,7 +1450,7 @@
  */
 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 @@
 						&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 {




More information about the asterisk-commits mailing list