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

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


Author: anthm
Date: Wed Aug 23 19:08:45 2006
New Revision: 2378

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

Log:
add presence

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:08:45 2006
@@ -148,6 +148,17 @@
 
 static int on_result(struct session *sess, ikspak * pak)
 {
+	iks *msg, *ctag;
+
+	msg = iks_make_pres (IKS_SHOW_AVAILABLE, "Available"); 
+	ctag = iks_insert(msg, "c");
+	iks_insert_attrib(ctag, "node", "http://www.freeswitch.org/xmpp/client/caps");
+	iks_insert_attrib(ctag, "ver", "1.0.0.1");
+	iks_insert_attrib(ctag, "client", "libdingaling");
+	iks_insert_attrib(ctag, "xmlns", "http://jabber.org/protocol/caps");
+
+	iks_send(sess->parser, msg);
+    iks_delete(msg);
 
 	return IKS_FILTER_EAT;
 }



More information about the Freeswitch-svn mailing list