]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Commit the remainder of r398523
authorKinsey Moore <kmoore@digium.com>
Fri, 6 Sep 2013 20:56:31 +0000 (20:56 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 6 Sep 2013 20:56:31 +0000 (20:56 +0000)
This is a missing part of the commit in revision 398523 that corrects
the name of a variable.

(issue ASTERISK-22435)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398576 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index 8d3dfa972e4eec36cb2228bbb6ea126ca021a7fa..c598114887f0a53c641bbfc2b05ba81347daeb7f 100644 (file)
@@ -3260,7 +3260,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;
@@ -3293,15 +3293,16 @@ static int aji_handle_pubsub_event(void *data, ikspak *pak)
                        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 {