This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 ) Change subject: xua: loadshare: select ASP for tx only if active ...................................................................... xua: loadshare: select ASP for tx only if active Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_as_fsm.c 3 files changed, 9 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 826b890..d0aa9a1 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -442,6 +442,7 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg); int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp); int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level); +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp); /*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID. * This function can be overridden by application code to implement whatever handling diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 8c547e8..fa6a338 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1352,6 +1352,13 @@ return 0; } +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp) +{ + if (!asp->fi) + return false; + return asp->fi->state == XUA_ASP_S_ACTIVE; +} + /*********************************************************************** * libosmo-netif integration for SCTP stream server/client ***********************************************************************/ diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index ab98da8..b0fbd2a 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -101,7 +101,7 @@ i = first_idx; do { asp = as->cfg.asps[i]; - if (asp) + if (asp && osmo_ss7_asp_active(asp)) break; i = (i + 1) % ARRAY_SIZE(as->cfg.asps); } while (i != first_idx); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 Gerrit-Change-Number: 15980 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191106/626ad885/attachment.htm>