From 5735a8161eed1126b6926c3c8e285479be62b0ea Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Wed, 8 Oct 2003 20:15:00 +0000 Subject: [PATCH] - rtpproxy_masq: fixed an issue in port allocation which lead to syslog entries from IPCHAINS complaining about 'already used connection' --- src/rtpproxy_masq.c | 57 ++++++++++++++++++++++++++------------------- src/sip_utils.c | 2 +- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/rtpproxy_masq.c b/src/rtpproxy_masq.c index e2aa4f1..0b4fa99 100644 --- a/src/rtpproxy_masq.c +++ b/src/rtpproxy_masq.c @@ -101,7 +101,7 @@ int rtp_masq_init( void ) { int rtp_masq_start_fwd(osip_call_id_t *callid, int media_stream_no, struct in_addr outbound_ipaddr, int *outbound_lcl_port, struct in_addr lcl_client_ipaddr, int lcl_clientport) { - int sts, i; + int sts, i, j; int freeidx; time_t t; osip_call_id_t cid; @@ -162,32 +162,25 @@ int rtp_masq_start_fwd(osip_call_id_t *callid, int media_stream_no, * media_stream_no). This can be due to UDP repetitions of the * INVITE request... */ + freeidx=-1; for (i=0; i %s@%s", cid1->number, cid1->host, cid2->number, cid2->host); - return STS_FAILURE; + return STS_SUCCESS; mismatch: DEBUGC(DBCLASS_BABBLE, "comparing callid - mismatch: "