<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15980">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">xua: loadshare: select ASP for tx only if active<br><br>Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3<br>---<br>M include/osmocom/sigtran/osmo_ss7.h<br>M src/osmo_ss7.c<br>M src/xua_as_fsm.c<br>3 files changed, 9 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/80/15980/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h</span><br><span>index 4f20d81..26b871b 100644</span><br><span>--- a/include/osmocom/sigtran/osmo_ss7.h</span><br><span>+++ b/include/osmocom/sigtran/osmo_ss7.h</span><br><span>@@ -431,6 +431,7 @@</span><br><span> int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);</span><br><span> int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);</span><br><span> int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);</span><br><span style="color: hsl(120, 100%, 40%);">+bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);</span><br><span> </span><br><span> /*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.</span><br><span>  *  This function can be overridden by application code to implement whatever handling</span><br><span>diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c</span><br><span>index efbceb8..532b332 100644</span><br><span>--- a/src/osmo_ss7.c</span><br><span>+++ b/src/osmo_ss7.c</span><br><span>@@ -1350,6 +1350,13 @@</span><br><span>        return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       if (!asp->fi)</span><br><span style="color: hsl(120, 100%, 40%);">+              return false;</span><br><span style="color: hsl(120, 100%, 40%);">+ return asp->fi->state == XUA_ASP_S_ACTIVE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /***********************************************************************</span><br><span>  * libosmo-netif integration for SCTP stream server/client</span><br><span>  ***********************************************************************/</span><br><span>diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c</span><br><span>index cf75ef3..b7074aa 100644</span><br><span>--- a/src/xua_as_fsm.c</span><br><span>+++ b/src/xua_as_fsm.c</span><br><span>@@ -97,7 +97,7 @@</span><br><span>        i = first_idx;</span><br><span>       do {</span><br><span>                 asp = as->cfg.asps[i];</span><br><span style="color: hsl(0, 100%, 40%);">-               if (asp)</span><br><span style="color: hsl(120, 100%, 40%);">+              if (asp && osmo_ss7_asp_active(asp))</span><br><span>                         break;</span><br><span>               i = (i + 1) % ARRAY_SIZE(as->cfg.asps);</span><br><span>   } while (i != first_idx);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15980">change 15980</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/+/15980"/><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: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 </div>
<div style="display:none"> Gerrit-Change-Number: 15980 </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>