<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/21385">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_client: get rid of magic numbers for E1 slots<br><br>use NUM_E1_TS-1 instead of 31 in relation of E1 timeslot count<br><br>Change-Id: Iee134d70f05883fcd2e58e0b9c78ed70aea16695<br>---<br>M src/libosmo-mgcp-client/Makefile.am<br>M src/libosmo-mgcp-client/mgcp_client.c<br>2 files changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp-client/Makefile.am b/src/libosmo-mgcp-client/Makefile.am</span><br><span>index 61b7822..ca2695a 100644</span><br><span>--- a/src/libosmo-mgcp-client/Makefile.am</span><br><span>+++ b/src/libosmo-mgcp-client/Makefile.am</span><br><span>@@ -9,6 +9,7 @@</span><br><span>       -Wall \</span><br><span>      $(LIBOSMOCORE_CFLAGS) \</span><br><span>      $(LIBOSMOVTY_CFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+        $(LIBOSMOABIS_CFLAGS) \</span><br><span>      $(COVERAGE_CFLAGS) \</span><br><span>         $(NULL)</span><br><span> </span><br><span>diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c</span><br><span>index 6f4c1f3..a134273 100644</span><br><span>--- a/src/libosmo-mgcp-client/mgcp_client.c</span><br><span>+++ b/src/libosmo-mgcp-client/mgcp_client.c</span><br><span>@@ -30,6 +30,8 @@</span><br><span> #include <osmocom/mgcp_client/mgcp_client.h></span><br><span> #include <osmocom/mgcp_client/mgcp_client_internal.h></span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/abis/e1_input.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include <netinet/in.h></span><br><span> #include <arpa/inet.h></span><br><span> </span><br><span>@@ -957,7 +959,7 @@</span><br><span> </span><br><span>         /* An E1 line has a maximum of 32 timeslots, while the first (ts=0) is</span><br><span>        * reserverd for framing and alignment, so we can not use it here. */</span><br><span style="color: hsl(0, 100%, 40%);">-   if (ts == 0 || ts > 31) {</span><br><span style="color: hsl(120, 100%, 40%);">+  if (ts == 0 || ts > NUM_E1_TS-1) {</span><br><span>                LOGP(DLMGCP, LOGL_ERROR,</span><br><span>                  "Cannot compose MGCP e1-endpoint name (%s), E1-timeslot number (%u) is invalid!\n", epname, ts);</span><br><span>              talloc_free(epname);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/21385">change 21385</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/c/osmo-mgw/+/21385"/><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-Change-Id: Iee134d70f05883fcd2e58e0b9c78ed70aea16695 </div>
<div style="display:none"> Gerrit-Change-Number: 21385 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>