[PATCH] libosmo-sccp[master]: sccp_scoc: Memorize if a connection is incoming or outbound

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
Fri Apr 14 20:30:02 UTC 2017


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

sccp_scoc: Memorize if a connection is incoming or outbound

This is not really needed by the state machines internally, so we have
to artificially add it to the sccp_connection.  We don't use it yet, but
upcoming code for VTY introspection of SCCP connections will be able to
use it.

Change-Id: Ic3c85152665abfb613e197b098c97392d16d16bf
---
M src/sccp_scoc.c
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 4bf340d..8621e6d 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -102,6 +102,9 @@
 	uint32_t sccp_class;
 	uint32_t release_cause; /* WAIT_CONN_CONF */
 
+	/* incoming (true) or outgoing (false) */
+	bool incoming;
+
 	/* Osmo FSM Instance of sccp_scoc_fsm */
 	struct osmo_fsm_inst *fi;
 
@@ -1514,6 +1517,7 @@
 		/* Allocate new connection */
 		conn = conn_create(inst);
 		conn->user = scu;
+		conn->incoming = true;
 	} else {
 		uint32_t conn_id;
 		/* Resolve existing connection */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3c85152665abfb613e197b098c97392d16d16bf
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