aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-10-22 21:36:43 +0200
committerlaforge <laforge@osmocom.org>2019-10-23 18:11:17 +0000
commitd98960d18972a5fcbcee448ac6742be20e0bec41 (patch)
treefd8a5ffabe5897e4eb0aece11345349818682a29
parent1870752ca7c1665731750d2c8288c148cf348b56 (diff)
Log correct protocol during xua_accept_cb()
This function is used for both actual SIGTRAN (M3UA, SUA over SCTP) as well as for IPA/SCCPLITE (over TCP). Having a static "SCTP" string in the log lines is confusing. Change-Id: Ic34ddbcd528cd871d9772665e1d0863896f33203
-rw-r--r--src/osmo_ss7.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 88c4922..464f2f4 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1710,9 +1710,9 @@ static int xua_accept_cb(struct osmo_stream_srv_link *link, int fd)
struct osmo_stream_srv *srv;
struct osmo_ss7_asp *asp;
char *sock_name = osmo_sock_get_name(link, fd);
+ const char *proto_name = get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto);
- LOGP(DLSS7, LOGL_INFO, "%s: New %s connection accepted\n",
- sock_name, get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto));
+ LOGP(DLSS7, LOGL_INFO, "%s: New %s connection accepted\n", sock_name, proto_name);
if (oxs->cfg.proto == OSMO_SS7_ASP_PROT_IPA) {
srv = osmo_stream_srv_create(oxs, link, fd,
@@ -1737,9 +1737,9 @@ static int xua_accept_cb(struct osmo_stream_srv_link *link, int fd)
sock_name, asp->cfg.name);
} else {
if (!oxs->cfg.accept_dyn_reg) {
- LOGP(DLSS7, LOGL_NOTICE, "%s: SCTP connection without matching "
+ LOGP(DLSS7, LOGL_NOTICE, "%s: %s connection without matching "
"ASP definition and no dynamic registration enabled, terminating\n",
- sock_name);
+ sock_name, proto_name);
} else {
char namebuf[32];
static uint32_t dyn_asp_num = 0;