[Asterisk-cvs] asterisk rtp.c,1.78,1.79
markster at lists.digium.com
markster at lists.digium.com
Thu Jul 8 08:00:28 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3838
Modified Files:
rtp.c
Log Message:
Extend bindaddr to RTP connections on SIP (bug #1989 et al)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- rtp.c 30 Jun 2004 16:56:51 -0000 1.78
+++ rtp.c 8 Jul 2004 11:46:15 -0000 1.79
@@ -786,7 +786,7 @@
return rtcp;
}
-struct ast_rtp *ast_rtp_new(struct sched_context *sched, struct io_context *io, int rtcpenable, int callbackmode)
+struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io_context *io, int rtcpenable, int callbackmode, struct in_addr addr)
{
struct ast_rtp *rtp;
int x;
@@ -817,6 +817,7 @@
for (;;) {
/* Must be an even port number by RTP spec */
rtp->us.sin_port = htons(x);
+ rtp->us.sin_addr = addr;
if (rtp->rtcp)
rtp->rtcp->us.sin_port = htons(x + 1);
if (!(first = bind(rtp->s, (struct sockaddr *)&rtp->us, sizeof(rtp->us))) &&
@@ -861,6 +862,13 @@
return rtp;
}
+struct ast_rtp *ast_rtp_new(struct sched_context *sched, struct io_context *io, int rtcpenable, int callbackmode)
+{
+ struct in_addr ia;
+ memset(&ia, 0, sizeof(ia));
+ return ast_rtp_new_with_bindaddr(sched, io, rtcpenable, callbackmode, ia);
+}
+
int ast_rtp_settos(struct ast_rtp *rtp, int tos)
{
int res;
More information about the svn-commits
mailing list