<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9645">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_client_fsm: improve error logging<br><br>Change-Id: I2feefaeefc2d71b64714585ef8137afbb4055b7e<br>---<br>M src/libosmo-mgcp-client/mgcp_client_fsm.c<br>1 file changed, 10 insertions(+), 3 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/45/9645/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>index 10a5b6d..25543ae 100644</span><br><span>--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>@@ -630,17 +630,24 @@</span><br><span>        OSMO_ASSERT(fi->state != ST_DLCX_RESP);</span><br><span> </span><br><span>       /* Check if IP/Port parameters make sense */</span><br><span style="color: hsl(0, 100%, 40%);">-    if (conn_peer->port == 0)</span><br><span style="color: hsl(120, 100%, 40%);">+  if (conn_peer->port == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                LOGPFSML(fi, LOGL_ERROR, "Cannot MDCX, port == 0\n");</span><br><span>              return -EINVAL;</span><br><span style="color: hsl(0, 100%, 40%);">- if (inet_aton(conn_peer->addr, &ip_test) == 0)</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (inet_aton(conn_peer->addr, &ip_test) == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+               LOGPFSML(fi, LOGL_ERROR, "Cannot MDCX, IP address == 0.0.0.0\n");</span><br><span>          return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span> </span><br><span>        /*! The user may supply an endpoint identifier in conn_peer. The</span><br><span>      *  identifier is then checked. This check is optional. Later steps do</span><br><span>        *  not depend on the endpoint identifier supplied here because it is</span><br><span>         *  already implicitly known from the CRCX phase. */</span><br><span style="color: hsl(0, 100%, 40%);">-    if (strlen(conn_peer->endpoint) && strcmp(conn_peer->endpoint, mgcp_ctx->conn_peer_remote.endpoint))</span><br><span style="color: hsl(120, 100%, 40%);">+ if (strlen(conn_peer->endpoint) && strcmp(conn_peer->endpoint, mgcp_ctx->conn_peer_remote.endpoint)) {</span><br><span style="color: hsl(120, 100%, 40%);">+               LOGPFSML(fi, LOGL_ERROR, "Cannot MDCX, endpoint mismatches: requested %s, should be %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                   conn_peer->endpoint, mgcp_ctx->conn_peer_remote.endpoint);</span><br><span>            return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span> </span><br><span>        /*! Note: The call-id is implicitly known from the previous CRCX and</span><br><span>          *  will not be checked even when it is set in conn_peer. */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9645">change 9645</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/9645"/><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: I2feefaeefc2d71b64714585ef8137afbb4055b7e </div>
<div style="display:none"> Gerrit-Change-Number: 9645 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>