Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/10998


Change subject: mgcp_osmux: Use define to calculate rtp_ssrc_winlen
......................................................................

mgcp_osmux: Use define to calculate rtp_ssrc_winlen

Since that define is already used to allocate size of osmux_cid_bitmap,
let's use it here too instead of hardcoding its value.

Change-Id: Ib2e4febee8bc6bcc035ad0a65c5c1eb94ef5e6fb
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/98/10998/1

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 5d16826..f842232 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -515,12 +515,12 @@
         *  used to reconstruct the RTP flow from osmux. The RTP SSRC is
         *  allocated based on the circuit ID (conn_net->osmux.cid), which is 
unique
         *  in the local scope to the BSC/BSC-NAT. We use it to divide the RTP
-        *  SSRC space (2^32) by the 256 possible circuit IDs, then randomly
+        *  SSRC space (2^32) by the OSMUX_CID_MAX + 1 possible circuit IDs, 
then randomly
         *  select one value from that window. Thus, we have no chance to have
         *  overlapping RTP SSRC traveling to the BTSes behind the BSC,
         *  similarly, for flows traveling to the MSC.
         */
-       static const uint32_t rtp_ssrc_winlen = UINT32_MAX / 256;
+       static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 
1);
        uint16_t osmux_dummy = endp->cfg->osmux_dummy;

        /* Check if osmux is enabled for the specified connection */

--
To view, visit https://gerrit.osmocom.org/10998
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2e4febee8bc6bcc035ad0a65c5c1eb94ef5e6fb
Gerrit-Change-Number: 10998
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to