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
This commit is contained in:
Harald Welte 2017-04-14 20:14:08 +02:00
parent f06c7f559a
commit f5a030fac8
1 changed files with 4 additions and 0 deletions

View File

@ -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 */