Change in osmo-mgw[master]: mgcp_osmux: Use define to calculate rtp_ssrc_winlen

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Sep 17 11:39:21 UTC 2018


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 <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180917/0be380f7/attachment.htm>


More information about the gerrit-log mailing list