<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/16100">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asp: Don't override ASP and SCTP role when re-entering asp node<br><br>The code to set the default role (SG) and default SCTP role (server)<br>must only be executed when the ASP node is first created.  Subsequent<br>times entering the pre-existing ASP node should not overwrite<br>those role settings [or any other configuration for that matter]<br><br>Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c<br>Closes: OS#4271<br>---<br>M src/osmo_ss7_vty.c<br>1 file changed, 8 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/00/16100/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c</span><br><span>index 0a3cea4..08d8c43 100644</span><br><span>--- a/src/osmo_ss7_vty.c</span><br><span>+++ b/src/osmo_ss7_vty.c</span><br><span>@@ -574,13 +574,16 @@</span><br><span>             return CMD_WARNING;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol);</span><br><span style="color: hsl(120, 100%, 40%);">+     asp = osmo_ss7_asp_find(inst, name, remote_port, local_port, protocol);</span><br><span>      if (!asp) {</span><br><span style="color: hsl(0, 100%, 40%);">-             vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE);</span><br><span style="color: hsl(0, 100%, 40%);">-          return CMD_WARNING;</span><br><span style="color: hsl(120, 100%, 40%);">+           asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (!asp) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+                        return CMD_WARNING;</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             asp->cfg.is_server = true;</span><br><span style="color: hsl(120, 100%, 40%);">+         asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;</span><br><span>     }</span><br><span style="color: hsl(0, 100%, 40%);">-       asp->cfg.is_server = true;</span><br><span style="color: hsl(0, 100%, 40%);">-   asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;</span><br><span> </span><br><span>         vty->node = L_CS7_ASP_NODE;</span><br><span>       vty->index = asp;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/16100">change 16100</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/libosmo-sccp/+/16100"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c </div>
<div style="display:none"> Gerrit-Change-Number: 16100 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>