[PATCH] osmo-msc[master]: cosmetic: rename subscr_conn_from to complete_layer3_type

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Apr 3 00:13:57 UTC 2018


Review at  https://gerrit.osmocom.org/7614

cosmetic: rename subscr_conn_from to complete_layer3_type

'subscr_conn_from' could mean anything: from what, RAN type? BSS identifier? MM
action? Clearly name it as the Complete Layer 3 kind it represents.

Related: OS#3122
Change-Id: I6263a80e6db01c2ca48df6c58b05e2fd19347057
---
M include/osmocom/msc/osmo_msc.h
M src/libmsc/gsm_04_08.c
M src/libmsc/subscr_conn.c
3 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/7614/1

diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index 6fe529e..d838e89 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -36,17 +36,17 @@
 	SUBSCR_CONN_S_RELEASED,
 };
 
-enum subscr_conn_from {
+enum complete_layer3_type {
 	SUBSCR_CONN_FROM_INVALID,
 	SUBSCR_CONN_FROM_LU,
 	SUBSCR_CONN_FROM_CM_SERVICE_REQ,
 	SUBSCR_CONN_FROM_PAGING_RESP,
 };
 
-extern const struct value_string subscr_conn_from_names[];
-static inline const char *subscr_conn_from_name(enum subscr_conn_from val)
+extern const struct value_string complete_layer3_type_names[];
+static inline const char *complete_layer3_type_name(enum complete_layer3_type val)
 {
-	return get_value_string(subscr_conn_from_names, val);
+	return get_value_string(complete_layer3_type_names, val);
 }
 
 enum msc_compl_l3_rc {
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 1bb6fa7..4624e90 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -317,7 +317,7 @@
  * Keep this function non-static for direct invocation by unit tests. */
 int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	static const enum subscr_conn_from conn_from_lu = SUBSCR_CONN_FROM_LU;
+	static const enum complete_layer3_type conn_from_lu = SUBSCR_CONN_FROM_LU;
 	struct gsm_network *net = conn->network;
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	struct gsm48_loc_upd_req *lu;
@@ -687,7 +687,7 @@
  */
 int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	static const enum subscr_conn_from conn_from_cm_service_req =
+	static const enum complete_layer3_type conn_from_cm_service_req =
 		SUBSCR_CONN_FROM_CM_SERVICE_REQ;
 	struct gsm_network *net = conn->network;
 	uint8_t mi_type;
@@ -1144,7 +1144,7 @@
 /* Receive a PAGING RESPONSE message from the MS */
 static int gsm48_rx_rr_pag_resp(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	static const enum subscr_conn_from conn_from_paging_resp =
+	static const enum complete_layer3_type conn_from_paging_resp =
 		SUBSCR_CONN_FROM_PAGING_RESP;
 	struct gsm_network *net = conn->network;
 	struct gsm48_hdr *gh = msgb_l3(msg);
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index 248c463..526ad92 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -46,7 +46,7 @@
 	{ 0, NULL }
 };
 
-const struct value_string subscr_conn_from_names[] = {
+const struct value_string complete_layer3_type_names[] = {
 	OSMO_VALUE_STRING(SUBSCR_CONN_FROM_INVALID),
 	OSMO_VALUE_STRING(SUBSCR_CONN_FROM_LU),
 	OSMO_VALUE_STRING(SUBSCR_CONN_FROM_CM_SERVICE_REQ),
@@ -70,12 +70,12 @@
 void subscr_conn_fsm_new(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
 	struct gsm_subscriber_connection *conn = fi->priv;
-	enum subscr_conn_from from = SUBSCR_CONN_FROM_INVALID;
+	enum complete_layer3_type from = SUBSCR_CONN_FROM_INVALID;
 	bool success;
 
 	if (data) {
-		from = *(enum subscr_conn_from*)data;
-		LOGPFSM(fi, "%s\n", subscr_conn_from_name(from));
+		from = *(enum complete_layer3_type*)data;
+		LOGPFSM(fi, "%s\n", complete_layer3_type_name(from));
 	}
 
 	/* If accepted, transition the state, all other cases mean failure. */

-- 
To view, visit https://gerrit.osmocom.org/7614
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6263a80e6db01c2ca48df6c58b05e2fd19347057
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list