[Asterisk-cvs] asterisk/channels chan_h323.c,1.121,1.122

jeremy at lists.digium.com jeremy at lists.digium.com
Wed Jul 27 00:33:20 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv26309

Modified Files:
	chan_h323.c 
Log Message:
one-way-audio problem on multihomed host with bind to secondary address. Bug #4505

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- chan_h323.c	10 Jul 2005 23:49:57 -0000	1.121
+++ chan_h323.c	27 Jul 2005 04:39:53 -0000	1.122
@@ -782,7 +782,7 @@
 		return NULL;
 	}
 	memset(pvt, 0, sizeof(struct oh323_pvt));
-	pvt->rtp = ast_rtp_new(sched, io, 1, 0);
+	pvt->rtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0,bindaddr.sin_addr);
 	if (!pvt->rtp) {
 		ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", strerror(errno));
 		free(pvt);
@@ -1108,8 +1108,8 @@
 	/* figure out our local RTP port and tell the H.323 stack about it */
 	ast_rtp_get_us(pvt->rtp, &us);
 	ast_mutex_unlock(&pvt->lock);
-	/* evil hack, until I (or someone?) figures out a better way */
-	ast_inet_ntoa(info->addr, sizeof(info->addr), bindaddr.sin_addr);
+
+	ast_inet_ntoa(info->addr, sizeof(info->addr), us.sin_addr);
 	info->port = ntohs(us.sin_port);
 	if (h323debug)
 		ast_log(LOG_DEBUG, "Sending RTP 'US' %s:%d\n", info->addr, info->port);




More information about the svn-commits mailing list