diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c index 6ed46489a7..3be3efc7a4 100644 --- a/src/mod/event_handlers/mod_rayo/mod_rayo.c +++ b/src/mod/event_handlers/mod_rayo/mod_rayo.c @@ -4784,19 +4784,23 @@ static void send_console_command(struct rayo_client *client, const char *to, con if (!iks_find_attrib(iq, "type")) { iks_insert_attrib(iq, "type", "set"); } + if (!iks_find_attrib(iq, "id")) { iks_insert_attrib_printf(iq, "id", "console-%i", RAYO_SEQ_NEXT(client)); } + iks_insert_attrib(iq, "from", RAYO_JID(client)); /* send command */ str = iks_string(iks_stack(iq), iq); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, str); + iks_free(str); rayo_client_command_recv(client, iq); iks_delete(command); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "bad request xml\n"); } + iks_parser_delete(p); }