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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_client_vty: remove unnecessary checks<br><br>The vty always checks if global_mgcp_client_conf exists. (there is also<br>an assert This check about global_mgcp_client_ctx).<br>global_mgcp_client_ctx and global_mgcp_client_conf are populated before<br>the VTY commands are installed. Unleass the caller uses the API wrong<br>and calls mgcp_client_vty_init with NULL pointers there cannot be a<br>problem with unpopulated pointers. Lets remove the checks as they are<br>not needed.<br><br>Change-Id: I892d14c588573f76640453cb9c194594289b59f1<br>Related: SYS#5091<br>---<br>M src/libosmo-mgcp-client/mgcp_client_vty.c<br>1 file changed, 0 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c</span><br><span>index 1126c5c..9b33eeb 100644</span><br><span>--- a/src/libosmo-mgcp-client/mgcp_client_vty.c</span><br><span>+++ b/src/libosmo-mgcp-client/mgcp_client_vty.c</span><br><span>@@ -42,9 +42,6 @@</span><br><span>       "local bind IPv4 address\n"</span><br><span>       "local bind IPv6 address\n")</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-    if (!global_mgcp_client_conf)</span><br><span style="color: hsl(0, 100%, 40%);">-           return CMD_ERR_NOTHING_TODO;</span><br><span style="color: hsl(0, 100%, 40%);">-    OSMO_ASSERT(global_mgcp_client_ctx);</span><br><span>         osmo_talloc_replace_string(global_mgcp_client_ctx,</span><br><span>                              (char**)&global_mgcp_client_conf->local_addr,</span><br><span>                                 argv[0]);</span><br><span>@@ -60,8 +57,6 @@</span><br><span>       MGW_STR "local port to connect to MGW from\n"</span><br><span>       "local bind port\n")</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-  if (!global_mgcp_client_conf)</span><br><span style="color: hsl(0, 100%, 40%);">-           return CMD_ERR_NOTHING_TODO;</span><br><span>         global_mgcp_client_conf->local_port = atoi(argv[0]);</span><br><span>      return CMD_SUCCESS;</span><br><span> }</span><br><span>@@ -76,9 +71,6 @@</span><br><span>       "remote IPv4 address\n"</span><br><span>       "remote IPv6 address\n")</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        if (!global_mgcp_client_conf)</span><br><span style="color: hsl(0, 100%, 40%);">-           return CMD_ERR_NOTHING_TODO;</span><br><span style="color: hsl(0, 100%, 40%);">-    OSMO_ASSERT(global_mgcp_client_ctx);</span><br><span>         osmo_talloc_replace_string(global_mgcp_client_ctx,</span><br><span>                              (char**)&global_mgcp_client_conf->remote_addr,</span><br><span>                                argv[0]);</span><br><span>@@ -94,8 +86,6 @@</span><br><span>       MGW_STR "remote port to reach the MGW at\n"</span><br><span>       "remote port\n")</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        if (!global_mgcp_client_conf)</span><br><span style="color: hsl(0, 100%, 40%);">-           return CMD_ERR_NOTHING_TODO;</span><br><span>         global_mgcp_client_conf->remote_port = atoi(argv[0]);</span><br><span>     return CMD_SUCCESS;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25029">change 25029</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/+/25029"/><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: I892d14c588573f76640453cb9c194594289b59f1 </div>
<div style="display:none"> Gerrit-Change-Number: 25029 </div>
<div style="display:none"> Gerrit-PatchSet: 11 </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: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>