<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15991">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">xua: Reset AS traffic mode set by peer during shutdown<br><br>This way the AS can be configured to use different traffic modes over<br>time as long as they don't overlap in time. That is in this case where<br>no specific traffic mode is specified in AS local configuration (VTY).<br><br>Some RFC4666 state similar behvor of deleting data set by ASPs during AS<br>shutdown. For instance:<br>"""<br>   Other ASPs may continue to be associated with the Application Server,<br>   in which case the Routing Key data SHOULD NOT be deleted.  If a<br>   Deregistration results in no more ASPs in an Application Server, an<br>   SG MAY delete the Routing Key data.<br>"""<br><br>This allows for tests to easily re-use same AS to test different traffic<br>modes as long as they wait for the recovery timeout (2 secs by default,<br>configurable via VTY).<br>Related: OS#4220<br>Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289<br>---<br>M src/xua_as_fsm.c<br>1 file changed, 12 insertions(+), 0 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/91/15991/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c</span><br><span>index b0fbd2a..04e592c 100644</span><br><span>--- a/src/xua_as_fsm.c</span><br><span>+++ b/src/xua_as_fsm.c</span><br><span>@@ -252,6 +252,17 @@</span><br><span>         case XUA_AS_S_PENDING:</span><br><span>               npar.status_info = M3UA_NOTIFY_I_AS_PEND;</span><br><span>            break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case XUA_AS_S_DOWN:</span><br><span style="color: hsl(120, 100%, 40%);">+           /* RFC4666 sec 4.3.2 AS States:</span><br><span style="color: hsl(120, 100%, 40%);">+                  If we end up here, it means no ASP is ACTIVE or INACTIVE,</span><br><span style="color: hsl(120, 100%, 40%);">+             meaning no ASP can have already configured the traffic mode</span><br><span style="color: hsl(120, 100%, 40%);">+                   in ASPAC or REG REQ. Hence, we can clear traffic mode defined</span><br><span style="color: hsl(120, 100%, 40%);">+                 by peers and allow next first peer to request a new traffic</span><br><span style="color: hsl(120, 100%, 40%);">+                   mode. */</span><br><span style="color: hsl(120, 100%, 40%);">+           as->cfg.mode_set_by_peer = false;</span><br><span style="color: hsl(120, 100%, 40%);">+          if (!as->cfg.mode_set_by_vty)</span><br><span style="color: hsl(120, 100%, 40%);">+                      as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE;</span><br><span style="color: hsl(120, 100%, 40%);">+          return;</span><br><span>      default:</span><br><span>             return;</span><br><span>      }</span><br><span>@@ -374,6 +385,7 @@</span><br><span>                                S(XUA_AS_S_INACTIVE),</span><br><span>              .name = "AS_DOWN",</span><br><span>                 .action = xua_as_fsm_down,</span><br><span style="color: hsl(120, 100%, 40%);">+            .onenter = xua_as_fsm_onenter,</span><br><span>       },</span><br><span>   [XUA_AS_S_INACTIVE] = {</span><br><span>              .in_event_mask = S(XUA_ASPAS_ASP_DOWN_IND) |</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15991">change 15991</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/+/15991"/><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: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 </div>
<div style="display:none"> Gerrit-Change-Number: 15991 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>