dect
/
asterisk
Archived
13
0
Fork 0

Actually check the "sendtodialplan" option setting for xmpp.

(closes issue ASTERISK-17978)
Reported by: elguero
Patches:
    stop_messages_going_to_dialplan.patch (license #5026)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@322244 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2011-06-07 19:17:31 +00:00
parent 21edfd3088
commit 855a87a67b
1 changed files with 14 additions and 12 deletions

View File

@ -2295,21 +2295,23 @@ static void aji_handle_message(struct aji_client *client, ikspak *pak)
ast_debug(3, "message comes from %s\n", insert->from);
}
if ((msg = ast_msg_alloc())) {
int res;
if (client->send_to_dialplan) {
if ((msg = ast_msg_alloc())) {
int res;
res = ast_msg_set_to(msg, "xmpp:%s", client->user);
res |= ast_msg_set_from(msg, "xmpp:%s", insert->from);
res |= ast_msg_set_body(msg, "%s", insert->message);
res |= ast_msg_set_context(msg, "%s", client->context);
res = ast_msg_set_to(msg, "xmpp:%s", client->user);
res |= ast_msg_set_from(msg, "xmpp:%s", insert->from);
res |= ast_msg_set_body(msg, "%s", insert->message);
res |= ast_msg_set_context(msg, "%s", client->context);
if (res) {
ast_msg_destroy(msg);
} else {
ast_msg_queue(msg);
if (res) {
ast_msg_destroy(msg);
} else {
ast_msg_queue(msg);
}
msg = NULL;
}
msg = NULL;
}
/* remove old messages received from this JID