summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-09-17 13:40:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-09-17 13:40:37 +0200
commitfe5eb01093f2ace107ef7edc30e447149341396c (patch)
treeadcf072e054fb32659ca361ad543117cd26ec8b4 /openbsc
parent6799c38eafa4c8138a0bf6e9f0d3390ec412c5df (diff)
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
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index a4b7e7a87..69f1c66b5 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -434,12 +434,12 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint
* 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",