Change in openbsc[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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Sep 17 12:48:22 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10999 )

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: I768ca1b510bf44508ae064dc31620e739260470b
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index a4b7e7a..69f1c66 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -434,12 +434,12 @@
 	 * used to reconstruct the RTP flow from osmux. The RTP SSRC is
 	 * allocated based on the circuit ID (endp->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);
 
 	if (endp->osmux.state == OSMUX_STATE_DISABLED) {
 		LOGP(DMGCP, LOGL_ERROR, "Endpoint %u didn't request Osmux\n",

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I768ca1b510bf44508ae064dc31620e739260470b
Gerrit-Change-Number: 10999
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180917/2efc34ed/attachment.htm>


More information about the gerrit-log mailing list