[PATCH] libosmo-sccp[master]: SUA: Our SUA implementation needs an SCCP instance in ss7_in...

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
Mon Apr 17 08:45:36 UTC 2017


Review at  https://gerrit.osmocom.org/2385

SUA: Our SUA implementation needs an SCCP instance in ss7_instance

So when we create a xua_server for SUA, we must make sure to create that
associated SCCP instance, if it doesn't already exist.  End-user
programs probably normally call this during their initialization anyway,
but in something like OsmoSTP, we need to auto-create it.

Change-Id: Ib575763dbd00f5bd7bfbf48f227a8f5ef9528e2a
---
M src/osmo_ss7.c
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/2385/1

diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 4aa7be5..6b77dc4 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1033,6 +1033,11 @@
 		asp->cfg.proto = proto;
 		asp->cfg.name = talloc_strdup(asp, name);
 		llist_add_tail(&asp->list, &inst->asp_list);
+
+		/* The SUA code internally needs SCCP to work */
+		if (proto == OSMO_SS7_ASP_PROT_SUA && !inst->sccp)
+			inst->sccp = osmo_sccp_instance_create(inst, NULL);
+
 	}
 	return asp;
 }
@@ -1617,6 +1622,10 @@
 	oxs->inst = inst;
 	llist_add_tail(&oxs->list, &inst->xua_servers);
 
+	/* The SUA code internally needs SCCP to work */
+	if (proto == OSMO_SS7_ASP_PROT_SUA && !inst->sccp)
+		inst->sccp = osmo_sccp_instance_create(inst, NULL);
+
 	return oxs;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/2385
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib575763dbd00f5bd7bfbf48f227a8f5ef9528e2a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list