pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39677?usp=email )
Change subject: Drop use of deprecated vty is_config_node() cb
......................................................................
Drop use of deprecated vty is_config_node() cb
This callback was drepecated and is not ever called since
libosmocore.git 70ce871532ab21955e0955d7e230eae65438f047 (release 1.3.0).
See also libosmocore.git d31de237582f6fe3315d61bb9a488d4cda92654e.
Change-Id: I391a6fc9f7325c1770ce410d31ed2d820726225a
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 0 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/39677/1
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 8da3199..77506c8 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -631,25 +631,6 @@
return vty->node;
}
-static int bsc_vty_is_config_node(struct vty *vty, int node)
-{
- /* Check if libosmo-sccp declares the node in
- * question as config node */
- if (osmo_ss7_is_config_node(vty, node))
- return 1;
-
- switch (node) {
- /* add items that are not config */
- case OML_NODE:
- case OM2K_NODE:
- case CONFIG_NODE:
- return 0;
-
- default:
- return 1;
- }
-}
-
static struct vty_app_info vty_info = {
.name = "OsmoBSC",
.copyright =
@@ -663,7 +644,6 @@
"There is NO WARRANTY, to the extent permitted by law.\r\n",
.version = PACKAGE_VERSION,
.go_parent_cb = bsc_vty_go_parent,
- .is_config_node = bsc_vty_is_config_node,
.usr_attr_desc = {
[BSC_VTY_ATTR_RESTART_ABIS_OML_LINK] = \
"This command applies on A-bis OML link (re)establishment",
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39677?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I391a6fc9f7325c1770ce410d31ed2d820726225a
Gerrit-Change-Number: 39677
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-smlc/+/39673?usp=email )
Change subject: Add missing required vty go_parent_cb for libosmo-sigtran
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
This one alone can fix the SMLC_Tests regressions that showed up today.
--
To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/39673?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: Ibab25aa1a9ed4d0680fb61999e79b56b9a7d08dc
Gerrit-Change-Number: 39673
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 16:50:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39667?usp=email )
Change subject: trau_frame cosmetic: fix doxygen comments
......................................................................
trau_frame cosmetic: fix doxygen comments
Change-Id: I5a69c25c4abeef0b62d92bedc2c56a2d533390c5
---
M src/trau/trau_frame.c
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 74f4526..b8085c2 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1231,10 +1231,10 @@
/*! Encode a TRAU frame from its decoded representation to a sequence of unpacked bits.
- * \param[out] bits caller-allocated buffer for unpacked outpud bits
+ * \param[out] bits caller-allocated buffer for unpacked output bits
* \param[in] n_bits size of 'bits' output buffer in number of unpacked bits
* \param[in] fr decoded representation of TRAU frame to be encoded
- * \return 0 number of unpacked output bits generated; negative in case of error
+ * \returns number of unpacked output bits generated; negative in case of error
*
* This function exhibits a behavioral quirk which users need to be aware of:
* for many frame types, the first 5 bits out of user-provided fr->c_bits[]
@@ -1326,10 +1326,10 @@
}
/*! Encode a TFO frame from its decoded representation to a sequence of unpacked bits.
- * \param[out] bits caller-allocated buffer for unpacked outpud bits
+ * \param[out] bits caller-allocated buffer for unpacked output bits
* \param[in] n_bits size of 'bits' output buffer in number of unpacked bits
* \param[in] fr decoded representation of TRAU frame to be encoded
- * \return 0 number of unpacked output bits generated; negative in case of error
+ * \returns number of unpacked output bits generated; negative in case of error
*
* Compared to regular osmo_trau_frame_encode(), this TFO-specific TRAU frame
* encoding function restricts the set of possible frame types to those that
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39667?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5a69c25c4abeef0b62d92bedc2c56a2d533390c5
Gerrit-Change-Number: 39667
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39668?usp=email )
Change subject: trau_frame cosmetic: document exact behavior for C1..C5
......................................................................
trau_frame cosmetic: document exact behavior for C1..C5
For historical reasons, osmo_trau_frame_encode() API has quirky
behavior with regard to output of control bits C1..C5: for some
frame types these bits are set to user-controlled values taken
from fr->c_bits[], yet for other frame types the function fills
in what it "knows" to be the correct frame type code, ignoring
the first 5 bits out of user-supplied fr->c_bits[]. One particular
combination of frame type and direction is even more bizarre,
taking only fr->c_bits[3] while fixing the other 4 C-bits.
Unfortunately this behavior cannot be changed without breaking
API compatibility with previous released versions, i.e., without
breaking external applications that rely on this library behavior.
Therefore, we do the next best thing: thoroughly and succinctly
document these quirks.
Change-Id: Id1824c7cc8845ee2a730d556bec807c3cfa75beb
---
M src/trau/trau_frame.c
1 file changed, 19 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index b8085c2..652c703 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1246,6 +1246,25 @@
* where C1..C5 may need to be modified (especially TFO-AMR where this C1..C5
* modification must be done before CRC computation), please use
* osmo_trau_frame_encode_tfo().
+ *
+ * The following list summarizes the behavior of the present function with
+ * regard to C1..C5 bits for different frame types:
+ *
+ * - For all TRAU-16k frame types in both UL and DL directions, and for
+ * OSMO_TRAU8_SPEECH (TRAU-8k for HRv1 speech) in UL direction, the first 5
+ * bits of fr->c_bits[] are ignored and replaced with internally supplied
+ * constant values.
+ *
+ * - For OSMO_TRAU8_SPEECH in DL direction, only fr->c_bits[3] is used to set
+ * C4; constant values for C1..C3 and odd parity value for C5 are fixed
+ * by the function.
+ *
+ * - For OSMO_TRAU8_DATA, OSMO_TRAU8_OAM and all AMR-8k frame types,
+ * user-supplied fr->c_bits[] are always used.
+ *
+ * This unfortunate manipulation applies only to C1..C5 as listed above;
+ * for control bits C6 and higher (for frame types that have them),
+ * user-supplied fr->c_bits[] are always used.
*/
int osmo_trau_frame_encode(ubit_t *bits, size_t n_bits, const struct osmo_trau_frame *fr)
{
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39668?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Id1824c7cc8845ee2a730d556bec807c3cfa75beb
Gerrit-Change-Number: 39668
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39675?usp=email )
Change subject: as: Introduce internal ss7_as_add_asp() to avoid unnecessary asp lookup
......................................................................
as: Introduce internal ss7_as_add_asp() to avoid unnecessary asp lookup
Change-Id: Id75fde04e39747fd3a7a1b169f7b925e5a8064d9
---
M src/osmo_ss7_as.c
M src/sccp_user.c
M src/ss7_as.h
M src/xua_asp_fsm.c
M src/xua_rkm.c
5 files changed, 26 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/75/39675/1
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index ab48ca8..6aadb8f 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -110,21 +110,16 @@
* \param[in] as Application Server to which \ref asp is added
* \param[in] asp Application Server Process to be added to \ref as
* \returns 0 on success; negative in case of error */
-int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
+int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
{
- struct osmo_ss7_asp *asp;
unsigned int i;
-
- OSMO_ASSERT(ss7_initialized);
- asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
- if (!asp)
- return -ENODEV;
-
- LOGPAS(as, DLSS7, LOGL_INFO, "Adding ASP %s to AS\n", asp->cfg.name);
+ OSMO_ASSERT(asp);
if (osmo_ss7_as_has_asp(as, asp))
return 0;
+ LOGPAS(as, DLSS7, LOGL_INFO, "Adding ASP %s to AS\n", asp->cfg.name);
+
for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
if (!as->cfg.asps[i]) {
as->cfg.asps[i] = asp;
@@ -137,6 +132,22 @@
return -ENOSPC;
}
+/*! \brief Add given ASP to given AS
+ * \param[in] as Application Server to which \ref asp is added
+ * \param[in] asp_name Name of Application Server Process to be added to \ref as
+ * \returns 0 on success; negative in case of error */
+int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
+{
+ struct osmo_ss7_asp *asp;
+
+ OSMO_ASSERT(ss7_initialized);
+ asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
+ if (!asp)
+ return -ENODEV;
+
+ return ss7_as_add_asp(as, asp);
+}
+
/*! \brief Delete given ASP from given AS
* \param[in] as Application Server from which \ref asp is deleted
* \param[in] asp Application Server Process to delete from \ref as
diff --git a/src/sccp_user.c b/src/sccp_user.c
index d60d66a..a32bbaa 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -633,7 +633,7 @@
asp = asp_i;
LOGP(DLSCCP, LOGL_NOTICE, "%s: ASP %s for %s is not associated with any AS, using it\n",
name, asp->cfg.name, osmo_ss7_asp_protocol_name(prot));
- osmo_ss7_as_add_asp(as, asp->cfg.name);
+ ss7_as_add_asp(as, asp);
break;
}
if (!asp) {
@@ -657,7 +657,7 @@
ss7_asp_peer_set_hosts(&asp->cfg.local, asp, &default_local_ip, 1);
if (default_remote_ip)
ss7_asp_peer_set_hosts(&asp->cfg.remote, asp, &default_remote_ip, 1);
- osmo_ss7_as_add_asp(as, asp->cfg.name);
+ ss7_as_add_asp(as, asp);
/* Make sure proper defaults are applied if app didn't
provide specific default values, then restart the ASP: */
ss7_asp_restart_after_reconfigure(asp);
@@ -866,7 +866,7 @@
goto out_asp;
asp->cfg.is_server = true;
asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;
- osmo_ss7_as_add_asp(as, asp_name);
+ ss7_as_add_asp(as, asp);
talloc_free(asp_name);
talloc_free(as_name);
osmo_ss7_asp_restart(asp);
diff --git a/src/ss7_as.h b/src/ss7_as.h
index 4a7c50d..db7372c 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -68,6 +68,7 @@
};
unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as);
+int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
#define LOGPAS(as, subsys, level, fmt, args ...) \
_LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args)
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index 0e39b0d..9ad9dce 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -958,7 +958,7 @@
iafp->ipa_unit->unit_name);
goto out_err;
}
- osmo_ss7_as_add_asp(as, asp->cfg.name);
+ ss7_as_add_asp(as, asp);
/* TODO: OAP Authentication? */
/* Send ID_ACK */
if (fd >= 0) {
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 9e77095..98f41c5 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -297,7 +297,7 @@
}
/* Success: Add just-create AS to connected ASP + report success */
- osmo_ss7_as_add_asp(as, asp->cfg.name);
+ ss7_as_add_asp(as, asp);
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx);
/* append to list of newly assigned as */
newly_assigned_as[(*nas_idx)++] = as;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39675?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Id75fde04e39747fd3a7a1b169f7b925e5a8064d9
Gerrit-Change-Number: 39675
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39676?usp=email )
Change subject: sccp_user: Fix ASP not restarted after associating a new AS to it
......................................................................
sccp_user: Fix ASP not restarted after associating a new AS to it
Recent commit introduced a regression when applying
default_layer_manager to all ASPs in m3ua-mode ASP.
The call to osmo_ss7_asp_restart() was moved to an inner code path but
I failed to figure out the ASP restart is also needed in this code path.
Fixes: ce63d3b2027cefb8412179497100d14ed3fee0dd
Change-Id: I5cccad3347dbea33433028e17571b1c16ecaf719
---
M src/sccp_user.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/76/39676/1
diff --git a/src/sccp_user.c b/src/sccp_user.c
index a32bbaa..b869dab 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -634,6 +634,11 @@
LOGP(DLSCCP, LOGL_NOTICE, "%s: ASP %s for %s is not associated with any AS, using it\n",
name, asp->cfg.name, osmo_ss7_asp_protocol_name(prot));
ss7_as_add_asp(as, asp);
+ /* ASP became associated to a new AS, hence it needs to be
+ * restarted to announce/register its Routing Context.
+ * Make sure proper defaults are applied if app didn't
+ * provide specific default values, then restart the ASP: */
+ ss7_asp_restart_after_reconfigure(asp);
break;
}
if (!asp) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39676?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I5cccad3347dbea33433028e17571b1c16ecaf719
Gerrit-Change-Number: 39676
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, laforge, osmith.
Hello Jenkins Builder, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39406?usp=email
to look at the new patch set (#9).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: AS loadsharing: Introduce AS rate_ctr rx:msu:sls:*
......................................................................
AS loadsharing: Introduce AS rate_ctr rx:msu:sls:*
Related: SYS#7112
Change-Id: I695bd3933a116323db45ab7f45dcf539791139aa
---
M src/ipa.c
M src/m3ua.c
M src/osmo_ss7_as.c
M src/ss7_as.h
M src/sua.c
5 files changed, 43 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/06/39406/9
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39406?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I695bd3933a116323db45ab7f45dcf539791139aa
Gerrit-Change-Number: 39406
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39406?usp=email )
Change subject: AS loadsharing: Introduce AS rate_ctr rx:msu:sls:*
......................................................................
Patch Set 8:
(1 comment)
File src/m3ua.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39406/comment/e2a4c3bb_653f8… :
PS8, Line 620: rate_ctr_inc2(as->ctrg, SS7_AS_CTR_RX_MSU_SLS_0 + xua->mtp.sls);
> It should, but I agree it makes sense to add an ASSERT.
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39406?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I695bd3933a116323db45ab7f45dcf539791139aa
Gerrit-Change-Number: 39406
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 16:39:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39674?usp=email )
Change subject: sccp_user: Move lookup to helper function to simplify code
......................................................................
sccp_user: Move lookup to helper function to simplify code
Keep lookup logic separate from already complex function with lots of
logic involved.
Change-Id: Ia2c8f9598e28be747bb3f1a61a1d8b0aa3d267b3
---
M src/sccp_user.c
1 file changed, 15 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/74/39674/1
diff --git a/src/sccp_user.c b/src/sccp_user.c
index cada057..d60d66a 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -491,6 +491,18 @@
* Convenience function for CLIENT
***********************************************************************/
+ /* Returns whether AS is already associated to any AS.
+ * Helper function for osmo_sccp_simple_client_on_ss7_id(). */
+static bool asp_serves_some_as(const struct osmo_ss7_asp *asp)
+{
+ struct osmo_ss7_as *as_i;
+ llist_for_each_entry(as_i, &asp->inst->as_list, list) {
+ if (osmo_ss7_as_has_asp(as_i, asp))
+ return true;
+ }
+ return false;
+}
+
/*! \brief request an sccp client instance
* \param[in] ctx talloc context
* \param[in] ss7_id of the SS7/CS7 instance
@@ -610,18 +622,11 @@
/* Check if the user has created an ASP for this proto that is not added on any AS yet. */
struct osmo_ss7_asp *asp_i;
llist_for_each_entry(asp_i, &ss7->asp_list, list) {
- struct osmo_ss7_as *as_i;
- bool is_on_as = false;
if (asp_i->cfg.proto != prot)
continue;
- llist_for_each_entry(as_i, &ss7->as_list, list) {
- if (!osmo_ss7_as_has_asp(as_i, asp_i))
- continue;
- is_on_as = true;
- break;
- }
- if (is_on_as) {
- /* This ASP is already on another AS. If it was on this AS, we'd have found it above. */
+ if (asp_serves_some_as(asp_i)) {
+ /* This ASP is already on another AS.
+ * If it was on this AS, we'd have found it above. */
continue;
}
/* This ASP matches the protocol and is not yet associated to any AS. Use it. */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39674?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c8f9598e28be747bb3f1a61a1d8b0aa3d267b3
Gerrit-Change-Number: 39674
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>