[asterisk-commits] kmoore: trunk r398603 - in /trunk: ./ res/res_jabber.c res/res_xmpp.c

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


Author: kmoore
Date: Fri Sep  6 16:23:02 2013
New Revision: 398603

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

Merged revisions 398580 from http://svn.asterisk.org/svn/asterisk/branches/12

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

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep  6 16:23:02 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511,398521,398533,398562,398572,398579
+/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511,398521,398533,398562,398572,398579-398580

Modified: trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_jabber.c?view=diff&rev=398603&r1=398602&r2=398603
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Fri Sep  6 16:23:02 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: trunk/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_xmpp.c?view=diff&rev=398603&r1=398602&r2=398603
==============================================================================
--- trunk/res/res_xmpp.c (original)
+++ trunk/res/res_xmpp.c Fri Sep  6 16:23:02 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