aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-12-18 22:05:24 +0100
committergsmevent admin <admin@gsmevent.box>2018-12-24 15:45:52 +0100
commitc741c5026c54d32983e8d1f6c3269ebfd58e22ce (patch)
treec14f2f69173757c06a839d3caf8cd00495f13aad
parent1fbf45c291f7e1f09ef2e862abfeca6a23efdc03 (diff)
tweak fsm_msc_mgcp FSM and FI name
Instead of MGW(MGW_99) use a name of msc-mgcp(MSISDN:2331_GERAN_A:00000017_trans99) 1. The FSM is communication towards an MGW, not the MGW itself. When reading combined logging (gsmtap_log), it is confusing to read 'MGW' in a log coming from the MSC. The API is also called msc_mgcp_*. 2. Calling the FSM instance 'MGW_' again doesn't make sense. 3. Indicate 'trans' before the trans_id (trans_id was already shown, but not indicated what it was). 4. Also indicate the actual subscriber's identification. 5. Also indicate the RAN connection and conn_id. This comes up while trying to understand a call coming in on an already established call: parsing the log with a human brain is near torture without this info, taking extremely long to get grips on. Change-Id: Ie5fc1ffb7eba0209fee4666a075655cd24d27473
-rw-r--r--src/libmsc/msc_mgcp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 46b8b0247..259fdfc86 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -943,7 +943,7 @@ static struct osmo_fsm_state fsm_msc_mgcp_states[] = {
/* State machine definition */
static struct osmo_fsm fsm_msc_mgcp = {
- .name = "MGW",
+ .name = "msc-mgcp",
.states = fsm_msc_mgcp_states,
.num_states = ARRAY_SIZE(fsm_msc_mgcp_states),
.log_subsys = DMGCP,
@@ -979,7 +979,6 @@ int msc_mgcp_try_call_assignment(struct gsm_trans *trans)
int msc_mgcp_call_assignment(struct gsm_trans *trans)
{
struct mgcp_ctx *mgcp_ctx;
- char name[32];
static bool fsm_registered = false;
struct ran_conn *conn;
struct mgcp_client *mgcp;
@@ -1009,9 +1008,6 @@ int msc_mgcp_call_assignment(struct gsm_trans *trans)
conn->iu.rab_id = next_iu_rab_id++;
#endif
- if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name))
- return -EINVAL;
-
/* Register the fsm description (if not already done) */
if (fsm_registered == false) {
osmo_fsm_register(&fsm_msc_mgcp);
@@ -1028,8 +1024,10 @@ int msc_mgcp_call_assignment(struct gsm_trans *trans)
vlr_subscr_name(trans->vsub), ENDPOINT_ID);
return -EINVAL;
}
- mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name);
+ mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, NULL);
OSMO_ASSERT(mgcp_ctx->fsm);
+ osmo_fsm_inst_update_id_f(mgcp_ctx->fsm, "%s_%s_trans%d",
+ vlr_subscr_name(trans->vsub), ran_conn_get_conn_id(conn), trans->transaction_id);
mgcp_ctx->fsm->priv = mgcp_ctx;
mgcp_ctx->mgcp = mgcp;
mgcp_ctx->trans = trans;