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

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


Author: kmoore
Date: Fri Sep  6 16:00:56 2013
New Revision: 398577

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

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

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

Modified: branches/11/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_jabber.c?view=diff&rev=398577&r1=398576&r2=398577
==============================================================================
--- branches/11/res/res_jabber.c (original)
+++ branches/11/res/res_jabber.c Fri Sep  6 16:00:56 2013
@@ -3319,7 +3319,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;
@@ -3352,15 +3352,16 @@
 			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);
-		if (!(event = ast_event_new(AST_EVENT_MWI, AST_EVENT_IE_MAILBOX,
-			AST_EVENT_IE_PLTYPE_STR, context, AST_EVENT_IE_CONTEXT,
-			AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_OLDMSGS,
-			AST_EVENT_IE_PLTYPE_UINT, oldmsgs, AST_EVENT_IE_NEWMSGS,
-			AST_EVENT_IE_PLTYPE_UINT, newmsgs, AST_EVENT_IE_EID, AST_EVENT_IE_PLTYPE_RAW,
-			&pubsub_eid, sizeof(pubsub_eid), AST_EVENT_IE_END))) {
+		if (!(event = ast_event_new(AST_EVENT_MWI,
+			AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
+			AST_EVENT_IE_CONTEXT, AST_EVENT_IE_PLTYPE_STR, item_id,
+			AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_UINT, oldmsgs,
+			AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_UINT, newmsgs,
+			AST_EVENT_IE_EID, AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
+			AST_EVENT_IE_END))) {
 			return IKS_FILTER_EAT;
 		}
 	} else {

Modified: branches/11/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_xmpp.c?view=diff&rev=398577&r1=398576&r2=398577
==============================================================================
--- branches/11/res/res_xmpp.c (original)
+++ branches/11/res/res_xmpp.c Fri Sep  6 16:00:56 2013
@@ -1309,7 +1309,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;
@@ -1341,15 +1341,16 @@
 			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);
-		if (!(event = ast_event_new(AST_EVENT_MWI, AST_EVENT_IE_MAILBOX,
-					    AST_EVENT_IE_PLTYPE_STR, context, AST_EVENT_IE_CONTEXT,
-					    AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_OLDMSGS,
-					    AST_EVENT_IE_PLTYPE_UINT, oldmsgs, AST_EVENT_IE_NEWMSGS,
-					    AST_EVENT_IE_PLTYPE_UINT, newmsgs, AST_EVENT_IE_EID, AST_EVENT_IE_PLTYPE_RAW,
-					    &pubsub_eid, sizeof(pubsub_eid), AST_EVENT_IE_END))) {
+		if (!(event = ast_event_new(AST_EVENT_MWI,
+			AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
+			AST_EVENT_IE_CONTEXT, AST_EVENT_IE_PLTYPE_STR, item_id,
+			AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_UINT, oldmsgs,
+			AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_UINT, newmsgs,
+			AST_EVENT_IE_EID, AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
+			AST_EVENT_IE_END))) {
 			return IKS_FILTER_EAT;
 		}
 	} else {




More information about the asterisk-commits mailing list