<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10998">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_osmux: Use define to calculate rtp_ssrc_winlen<br><br>Since that define is already used to allocate size of osmux_cid_bitmap,<br>let's use it here too instead of hardcoding its value.<br><br>Change-Id: Ib2e4febee8bc6bcc035ad0a65c5c1eb94ef5e6fb<br>---<br>M src/libosmo-mgcp/mgcp_osmux.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/98/10998/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c</span><br><span>index 5d16826..f842232 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_osmux.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_osmux.c</span><br><span>@@ -515,12 +515,12 @@</span><br><span>     *  used to reconstruct the RTP flow from osmux. The RTP SSRC is</span><br><span>      *  allocated based on the circuit ID (conn_net->osmux.cid), which is unique</span><br><span>       *  in the local scope to the BSC/BSC-NAT. We use it to divide the RTP</span><br><span style="color: hsl(0, 100%, 40%);">-   *  SSRC space (2^32) by the 256 possible circuit IDs, then randomly</span><br><span style="color: hsl(120, 100%, 40%);">+   *  SSRC space (2^32) by the OSMUX_CID_MAX + 1 possible circuit IDs, then randomly</span><br><span>    *  select one value from that window. Thus, we have no chance to have</span><br><span>        *  overlapping RTP SSRC traveling to the BTSes behind the BSC,</span><br><span>       *  similarly, for flows traveling to the MSC.</span><br><span>        */</span><br><span style="color: hsl(0, 100%, 40%);">-     static const uint32_t rtp_ssrc_winlen = UINT32_MAX / 256;</span><br><span style="color: hsl(120, 100%, 40%);">+     static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);</span><br><span>    uint16_t osmux_dummy = endp->cfg->osmux_dummy;</span><br><span> </span><br><span>     /* Check if osmux is enabled for the specified connection */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10998">change 10998</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10998"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib2e4febee8bc6bcc035ad0a65c5c1eb94ef5e6fb </div>
<div style="display:none"> Gerrit-Change-Number: 10998 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>