[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42445 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Sep 8 10:30:02 MST 2006
Author: pcadach
Date: Fri Sep 8 12:30:01 2006
New Revision: 42445
URL: http://svn.digium.com/view/asterisk?rev=42445&view=rev
Log:
Use local hostname's address if no bind address specified
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=42445&r1=42444&r2=42445&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Fri Sep 8 12:30:01 2006
@@ -895,10 +895,17 @@
static int __oh323_rtp_create(struct oh323_pvt *pvt)
{
+ struct in_addr our_addr;
+
if (pvt->rtp)
return 0;
- pvt->rtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0, bindaddr.sin_addr);
+ if(ast_find_ourip(&our_addr, bindaddr)) {
+ ast_mutex_unlock(&pvt->lock);
+ ast_log(LOG_ERROR, "Unable to locate local IP address for RTP stream\n");
+ return -1;
+ }
+ pvt->rtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0, our_addr);
if (!pvt->rtp) {
ast_mutex_unlock(&pvt->lock);
ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", strerror(errno));
More information about the asterisk-commits
mailing list