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
This commit is contained in:
parent
4d3a66b3f8
commit
1ba0df26dc
|
@ -36,17 +36,17 @@ enum subscr_conn_fsm_state {
|
|||
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 {
|
||||
|
|
|
@ -317,7 +317,7 @@ static const struct value_string lupd_names[] = {
|
|||
* 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 @@ accept_reuse:
|
|||
*/
|
||||
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 @@ static uint8_t *gsm48_cm2_get_mi(uint8_t *classmark2_lv, unsigned int tot_len)
|
|||
/* 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);
|
||||
|
|
|
@ -46,7 +46,7 @@ static const struct value_string subscr_conn_fsm_event_names[] = {
|
|||
{ 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_init(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
|||
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. */
|
||||
|
|
Loading…
Reference in New Issue