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/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at  https://gerrit.osmocom.org/2343
osmo_ss7_vty: Don't save dynamically generated AS / ASP
If RKM has dynamically generated some AS definitions on the fly, or if
we accepted auto-creation of ASPs on SCTP connect time, then we don't
wnat to save such objects during vty config file store.
Change-Id: I9d0b0b61737a30b9d6e76cecbe42ec071bcddeeb
---
M src/osmo_ss7_vty.c
1 file changed, 9 insertions(+), 0 deletions(-)
  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/43/2343/1
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 08229dc..b08a456 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -592,6 +592,11 @@
 
 static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp)
 {
+	/* skip any dynamically created ASPs (auto-created at connect
+	 * time) */
+	if (asp->dyn_allocated)
+		return;
+
 	vty_out(vty, " asp %s %u %u %s%s",
 		asp->cfg.name, asp->cfg.remote.port, asp->cfg.local.port,
 		osmo_ss7_asp_protocol_name(asp->cfg.proto), VTY_NEWLINE);
@@ -787,6 +792,10 @@
 	struct osmo_ss7_routing_key *rkey;
 	unsigned int i;
 
+	/* skip any dynamically allocated AS definitions */
+	if (as->rkm_dyn_allocated)
+		return;
+
 	vty_out(vty, " as %s %s%s", as->cfg.name,
 		osmo_ss7_asp_protocol_name(as->cfg.proto), VTY_NEWLINE);
 	if (as->cfg.description)
-- 
To view, visit https://gerrit.osmocom.org/2343
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d0b0b61737a30b9d6e76cecbe42ec071bcddeeb
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>