aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-14 16:55:12 +0200
committerpespin <pespin@sysmocom.de>2019-08-20 10:34:29 +0000
commitf9132653097ea0398534c97943e5674a77aab762 (patch)
tree051fb5a4419d0daba741340d48b9b1a5765e0c8f
parent5b6c4b8ccd1ecde31f5764fe3fcd7837bfc37ab4 (diff)
gprs_gmm: Avoid spaces in fsm events and enum strings
FSM doesn't expect receiving event names containing spaces (log lines generated are confusing). Similar for enums, it's better using code names to match easily and make log lines more clear. Change-Id: I16ede8bf8352b09bc772fd7b43fad2c2274b3ec1
-rw-r--r--src/gprs/gprs_gmm.c12
-rw-r--r--src/gprs/gprs_gmm_attach.c22
2 files changed, 17 insertions, 17 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 2f271827..b8b01167 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -107,12 +107,12 @@ static const struct tlv_definition gsm48_sm_att_tlvdef = {
};
static const struct value_string gprs_pmm_state_names[] = {
- { PMM_DETACHED, "PMM DETACH" },
- { PMM_CONNECTED, "PMM CONNECTED" },
- { PMM_IDLE, "PMM IDLE" },
- { MM_IDLE, "MM IDLE" },
- { MM_READY, "MM READY" },
- { MM_STANDBY, "MM STANDBY" },
+ OSMO_VALUE_STRING(PMM_DETACHED),
+ OSMO_VALUE_STRING(PMM_CONNECTED),
+ OSMO_VALUE_STRING(PMM_IDLE),
+ OSMO_VALUE_STRING(MM_IDLE),
+ OSMO_VALUE_STRING(MM_READY),
+ OSMO_VALUE_STRING(MM_STANDBY),
{ 0, NULL }
};
diff --git a/src/gprs/gprs_gmm_attach.c b/src/gprs/gprs_gmm_attach.c
index 1ab11f76..2217b0ab 100644
--- a/src/gprs/gprs_gmm_attach.c
+++ b/src/gprs/gprs_gmm_attach.c
@@ -316,17 +316,17 @@ static struct osmo_fsm_state gmm_attach_req_fsm_states[] = {
};
const struct value_string gmm_attach_req_fsm_event_names[] = {
- { E_ATTACH_REQ_RECV, "Received an attach request" },
- { E_IDEN_RESP_RECV, "Identity Request received" },
- { E_AUTH_RESP_RECV_SUCCESS, "Authentication Response received" },
- { E_AUTH_RESP_RECV_RESYNC, "Authentication Failure with resync received" },
- { E_ATTACH_ACCEPTED, "Attach accepted" },
- { E_ATTACH_ACCEPT_SENT, "Attach accept sent" },
- { E_ATTACH_COMPLETE_RECV, "Attach complete received." },
- { E_IU_SECURITY_CMD_COMPLETE, "IU Security Command Complete received." },
- { E_REJECT, "Reject the MS"},
- { E_VLR_ANSWERED, "VLR answered"},
- { 0, NULL }
+ OSMO_VALUE_STRING(E_ATTACH_REQ_RECV),
+ OSMO_VALUE_STRING(E_IDEN_RESP_RECV),
+ OSMO_VALUE_STRING(E_AUTH_RESP_RECV_SUCCESS),
+ OSMO_VALUE_STRING(E_AUTH_RESP_RECV_RESYNC),
+ OSMO_VALUE_STRING(E_ATTACH_ACCEPTED),
+ OSMO_VALUE_STRING(E_ATTACH_ACCEPT_SENT),
+ OSMO_VALUE_STRING(E_ATTACH_COMPLETE_RECV),
+ OSMO_VALUE_STRING(E_IU_SECURITY_CMD_COMPLETE),
+ OSMO_VALUE_STRING(E_REJECT),
+ OSMO_VALUE_STRING(E_VLR_ANSWERED),
+ { 0, NULL }
};
void gmm_attach_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) {