Change in libosmo-sccp[master]: NOT FOR MERGE: separate sccp user conn id

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Mar 29 16:57:02 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13466


Change subject: NOT FOR MERGE: separate sccp user conn id
......................................................................

NOT FOR MERGE: separate sccp user conn id

Change-Id: Ifd55c6b7ed2558ff072042079cf45f5068a971de
---
M src/sccp_scoc.c
1 file changed, 7 insertions(+), 6 deletions(-)



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

diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index cb1d567..57d27ad 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -724,7 +724,7 @@
 	switch (OSMO_PRIM_HDR(&scu_prim->oph)) {
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION):
 		udisp = &scu_prim->u.disconnect;
-		udisp->conn_id = conn->conn_id;
+		udisp->conn_id = conn->user_conn_id;
 		udisp->responding_addr = conn->called_addr;
 		udisp->originator = OSMO_SCCP_ORIG_UNDEFINED;
 		//udisp->in_sequence_control;
@@ -743,7 +743,7 @@
 		break;
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_INDICATION):
 		uconp = &scu_prim->u.connect;
-		uconp->conn_id = conn->conn_id;
+		uconp->conn_id = scu_gen_conn_id(conn->user...);
 		uconp->called_addr = conn->called_addr;
 		uconp->calling_addr = conn->calling_addr;
 		uconp->sccp_class = conn->sccp_class;
@@ -759,7 +759,7 @@
 		break;
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_CONFIRM):
 		uconp = &scu_prim->u.connect;
-		uconp->conn_id = conn->conn_id;
+		uxxp->conn_id = conn->user_conn_id;
 		uconp->called_addr = conn->called_addr;
 		uconp->calling_addr = conn->calling_addr;
 		//scu_prim->u.connect.in_sequence_control
@@ -774,7 +774,7 @@
 		break;
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION):
 		udatp = &scu_prim->u.data;
-		udatp->conn_id = conn->conn_id;
+		xx->conn_id = conn->user_conn_id;
 		udatp->importance = conn->importance;
 		data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA);
 		if (data_ie) {
@@ -1710,7 +1710,8 @@
 		return sccp_sclc_user_sap_down(scu, oph);
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_REQUEST):
 		/* Allocate new connection structure */
-		conn = conn_create_id(inst, prim->u.connect.conn_id);
+		conn = conn_create(inst);
+		conn->user_conn_id = prim->u.connect.conn_id;
 		if (!conn) {
 			/* FIXME: inform SCCP user with proper reply */
 			LOGP(DLSCCP, LOGL_ERROR, "Cannot create conn-id for primitive %s\n",
@@ -1724,7 +1725,7 @@
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_REQUEST):
 	case OSMO_PRIM(OSMO_SCU_PRIM_N_RESET, PRIM_OP_REQUEST):
 		/* Resolve existing connection structure */
-		conn = conn_find_by_id(inst, scu_prim_conn_id(prim));
+		conn = conn_find_by_user_id(inst, scu, scu_prim_conn_id(prim));
 		if (!conn) {
 			/* FIXME: inform SCCP user with proper reply */
 			LOGP(DLSCCP, LOGL_ERROR, "Received unknown conn-id %u for primitive %s\n",

-- 
To view, visit https://gerrit.osmocom.org/13466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd55c6b7ed2558ff072042079cf45f5068a971de
Gerrit-Change-Number: 13466
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190329/8e0c7168/attachment.html>


More information about the gerrit-log mailing list