<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10997">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp: Fix (again) osmux_cid_bitmap static array size calculation<br><br>A previous commit merged today fixed array size boundary (multiple of 8<br>bits), but removed a required +1 which should be kept on top, because<br>OSMUX_CID_MAX specified the maximum number used by a CID, that is<br>(0,OSMUX_CID_MAX), and as a result we require OSMUX_CID_MAX+1 slots.<br><br>Fixes: 65f422ad5878165be0a1eb05605aa3099536f0c8<br>Change-Id: I182c9c1a6dd28a4c5c0d8107d53852cf47541592<br>---<br>M openbsc/src/libmgcp/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/openbsc refs/changes/97/10997/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>index ca0ed30..a4b7e7a 100644</span><br><span>--- a/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>+++ b/openbsc/src/libmgcp/mgcp_osmux.c</span><br><span>@@ -544,8 +544,8 @@</span><br><span>                           htons(endp->cfg->osmux_port), buf, sizeof(buf));</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* bsc-nat allocates/releases the Osmux circuit ID */</span><br><span style="color: hsl(0, 100%, 40%);">-static uint8_t osmux_cid_bitmap[(OSMUX_CID_MAX + 7) / 8];</span><br><span style="color: hsl(120, 100%, 40%);">+/* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */</span><br><span style="color: hsl(120, 100%, 40%);">+static uint8_t osmux_cid_bitmap[(OSMUX_CID_MAX + 1 + 7) / 8];</span><br><span> </span><br><span> int osmux_used_cid(void)</span><br><span> {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10997">change 10997</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/10997"/><meta itemprop="name" content="View Change"/></div></div>

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