summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-11-05 17:39:37 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-11-05 19:12:53 +0100
commitac9c90762c9ada6f2b35fed6731c1a619fcebbb6 (patch)
tree4978c1c8dd9370cc4c0780f1b6beba1a319bf59f
parentd89d2b81cb299109e5f43d2c8f17e5fe7a66f1ff (diff)
-rw-r--r--src/xua_as_fsm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index b7074aa..1ed5bc7 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -95,14 +95,16 @@ static struct osmo_ss7_asp *xua_as_select_asp_roundrobin(struct osmo_ss7_as *as)
first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps);
i = first_idx;
+ LOGPFSM(as->fi, "tx loadshare: first_idx=%u/%lu\n", first_idx, ARRAY_SIZE(as->cfg.asps));
do {
+ LOGPFSM(as->fi, "tx loadshare: checking asp %u: %p\n", i, as->cfg.asps[i]);
asp = as->cfg.asps[i];
if (asp && osmo_ss7_asp_active(asp))
break;
i = (i + 1) % ARRAY_SIZE(as->cfg.asps);
} while (i != first_idx);
as->cfg.last_asp_idx_sent = i;
-
+ LOGPFSM(as->fi, "tx loadshare: returning asp %u: %p\n", i, as->cfg.asps[i]);
return asp;
}
@@ -111,6 +113,8 @@ int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg)
{
struct osmo_ss7_asp *asp = NULL;
+ LOGPFSM(as->fi, "Tx using traffic mode %s\n", osmo_ss7_as_traffic_mode_name(as->cfg.mode));
+
switch (as->cfg.mode) {
case OSMO_SS7_AS_TMOD_OVERRIDE:
asp = xua_as_select_asp_override(as);
@@ -132,7 +136,7 @@ int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg)
msgb_free(msg);
return -1;
}
-
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "selected for transmission\n");
return osmo_ss7_asp_send(asp, msg);
}