summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-14 20:14:08 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-14 20:25:50 +0200
commitf5a030fac89ab47e1fa787a799a5ed0d9f4104d3 (patch)
tree1db8a0cc306f78041c516bc80b2710a48f1bddbf
parentf06c7f559a69147bca8d2abec7ba60319292c445 (diff)
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
-rw-r--r--src/sccp_scoc.c4
1 files changed, 4 insertions, 0 deletions
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 @@ struct sccp_connection {
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 @@ void sccp_scoc_rx_from_scrc(struct osmo_sccp_instance *inst,
/* Allocate new connection */
conn = conn_create(inst);
conn->user = scu;
+ conn->incoming = true;
} else {
uint32_t conn_id;
/* Resolve existing connection */