[asterisk-commits] pcadach: branch pcadach/chan_h323-live r41261 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Aug 28 20:14:10 MST 2006
Author: pcadach
Date: Mon Aug 28 22:14:10 2006
New Revision: 41261
URL: http://svn.digium.com/view/asterisk?rev=41261&view=rev
Log:
Reflect changes in RTP bridging mechanism
Modified:
team/pcadach/chan_h323-live/channels/chan_h323.c
Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=41261&r1=41260&r2=41261&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Mon Aug 28 22:14:10 2006
@@ -2380,19 +2380,27 @@
static struct ast_cli_entry cli_h323_reload =
{ { "h.323", "reload", NULL }, h323_reload, "Reload H.323 configuration", h323_reload_usage };
-static struct ast_rtp *oh323_get_rtp_peer(struct ast_channel *chan)
+static enum ast_rtp_get_result oh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp)
{
struct oh323_pvt *pvt;
- pvt = (struct oh323_pvt *) chan->tech_pvt;
- if (pvt && pvt->rtp && pvt->options.bridge) {
- return pvt->rtp;
- }
- return NULL;
-}
-
-static struct ast_rtp *oh323_get_vrtp_peer(struct ast_channel *chan)
-{
- return NULL;
+ enum ast_rtp_get_result res = AST_RTP_GET_FAILED;
+
+ if (!(pvt = (struct oh323_pvt *)chan->tech_pvt))
+ return res;
+
+ ast_mutex_lock(&pvt->lock);
+ if (pvt->rtp && pvt->options.bridge) {
+ *rtp = pvt->rtp;
+ res = AST_RTP_TRY_NATIVE;
+ }
+ ast_mutex_unlock(&pvt->lock);
+
+ return res;
+}
+
+static enum ast_rtp_get_result oh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp **rtp)
+{
+ return AST_RTP_GET_FAILED;
}
static char *convertcap(int cap)
More information about the asterisk-commits
mailing list