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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/98/198/1
Kinsey Moore 12 years ago
parent 05a7d1998d
commit f09236541e

@ -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 {

Loading…
Cancel
Save