Change in ...osmo-sgsn[master]: gprs_gmm: Avoid spaces in fsm events and enum strings

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Aug 20 10:34:31 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15212 )

Change subject: gprs_gmm: Avoid spaces in fsm events and enum strings
......................................................................

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
---
M src/gprs/gprs_gmm.c
M src/gprs/gprs_gmm_attach.c
2 files changed, 17 insertions(+), 17 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  lynxis lazus: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 2f27182..b8b0116 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -107,12 +107,12 @@
 };
 
 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 1ab11f7..2217b0a 100644
--- a/src/gprs/gprs_gmm_attach.c
+++ b/src/gprs/gprs_gmm_attach.c
@@ -316,17 +316,17 @@
 };
 
 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) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15212
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I16ede8bf8352b09bc772fd7b43fad2c2274b3ec1
Gerrit-Change-Number: 15212
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <axilirator at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190820/a42f4b5e/attachment.htm>


More information about the gerrit-log mailing list