[asterisk-commits] branch mogorman/asterisk-xmpp r10575 - in /team/mogorman/asterisk-xmpp: chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 20 12:43:05 MST 2006


Author: mogorman
Date: Mon Feb 20 13:43:04 2006
New Revision: 10575

URL: http://svn.digium.com/view/asterisk?rev=10575&view=rev
Log:
More rtp

Modified:
    team/mogorman/asterisk-xmpp/channels/chan_xmpp.c
    team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h

Modified: team/mogorman/asterisk-xmpp/channels/chan_xmpp.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/channels/chan_xmpp.c?rev=10575&r1=10574&r2=10575&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/channels/chan_xmpp.c (original)
+++ team/mogorman/asterisk-xmpp/channels/chan_xmpp.c Mon Feb 20 13:43:04 2006
@@ -107,6 +107,11 @@
 	.fixup = xmpp_fixup,
 	.send_html = xmpp_sendhtml,
 };
+
+static struct sockaddr_in bindaddr = { 0, };	/*!< The address we bind to */
+
+static struct sched_context *sched;	/*!< The scheduling context */
+static struct io_context *io;		/*!< The IO context */
 
 /*----- RTP interface functions */
 static int xmpp_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, int codecs, int nat_active);
@@ -405,7 +410,8 @@
 	if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
 		return NULL;
 	}
-	
+	tmp->rtp =  ast_rtp_new_with_bindaddr(sched, io, 1, 0, bindaddr.sin_addr);
+
 	ast_mutex_init(&tmp->lock);
 	ast_mutex_lock(&xmpplock);
 	tmp->next = client->xmpps;
@@ -837,6 +843,17 @@
 /*! \brief Load module into PBX, register channel */
 int load_module()
 {
+
+	sched = sched_context_create();
+	if (!sched) {
+		ast_log(LOG_WARNING, "Unable to create schedule context\n");
+	}
+
+	io = io_context_create();
+	if (!io) {
+		ast_log(LOG_WARNING, "Unable to create I/O context\n");
+	}
+
 	ast_axi_jingle_register(xmpp_parser);
 	/* Make sure we can register our channel type */
 	if (ast_channel_register(&xmpp_tech)) {

Modified: team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h?rev=10575&r1=10574&r2=10575&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h (original)
+++ team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h Mon Feb 20 13:43:04 2006
@@ -96,7 +96,7 @@
 	char from[100];
 	struct axi_candidate *candidates;
 	struct ast_channel *owner;		/* Master Channel */
-	struct ast_rtp *rtp;                    /*!< RTP Session */
+	struct ast_rtp *rtp;          /*!< RTP Session */
 	struct xmpp_pvt *next;			/* Next entity */
 	
 



More information about the asterisk-commits mailing list