[Freeswitch-svn] [commit] r2379 - freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event

Freeswitch SVN anthm at freeswitch.org
Wed Aug 23 19:24:23 EDT 2006


Author: anthm
Date: Wed Aug 23 19:24:23 2006
New Revision: 2379

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c

Log:
add reply

Modified: freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c	Wed Aug 23 19:24:23 2006
@@ -253,6 +253,7 @@
 	switch_stream_handle_t stream = {0};
 	char retbuf[2048] = "";
 	char *p;
+	iks *msg;
 
 	if ((p = strchr(cmd, '\r')) != 0) {
 		*p++ = '\0';
@@ -269,6 +270,13 @@
 	stream.data_size = sizeof(retbuf);
 	stream.write_function = switch_console_stream_write;
 	switch_api_execute(cmd, arg, NULL, &stream);
+
+	
+	msg = iks_make_msg(IKS_TYPE_NONE, globals.target_jid, retbuf);
+	iks_insert_attrib(msg, "subject", "Reply");
+	iks_send(globals.session.parser, msg);
+	iks_delete(msg);
+	
 
 	return 0;
 }



More information about the Freeswitch-svn mailing list