laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/38413?usp=email )

Change subject: vlr: vlr_auth_fsm: make the fsm private
......................................................................

vlr: vlr_auth_fsm: make the fsm private

Like all the other libvlr fsm, they are private to their own files,
keep the vlr_auth_fsm the same and be consistant.

Change-Id: Iec85f299cd99879475ab094998433d935e980394
---
M src/libvlr/vlr.c
M src/libvlr/vlr_auth_fsm.c
M src/libvlr/vlr_auth_fsm.h
3 files changed, 15 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve




diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 7301703..ad2baf8 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1551,7 +1551,7 @@
        osmo_tdefs_reset(msc_tdefs_vlr);

        /* osmo_auth_fsm.c */
-       OSMO_ASSERT(osmo_fsm_register(&vlr_auth_fsm) == 0);
+       vlr_auth_fsm_init();
        /* osmo_lu_fsm.c */
        vlr_lu_fsm_init();
        /* vlr_access_request_fsm.c */
@@ -1699,7 +1699,7 @@

        switch (logc) {
        case OSMO_VLR_LOGC_VLR:
-               vlr_auth_fsm.log_subsys = logc_num;
+               vlr_auth_fsm_set_log_subsys(logc_num);
                vlr_parq_fsm_set_log_subsys(logc_num);
                vlr_lu_fsm_set_log_subsys(logc_num);
                break;
diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c
index db89be3..aa031c3 100644
--- a/src/libvlr/vlr_auth_fsm.c
+++ b/src/libvlr/vlr_auth_fsm.c
@@ -603,7 +603,7 @@
        },
 };

-struct osmo_fsm vlr_auth_fsm = {
+static struct osmo_fsm vlr_auth_fsm = {
        .name = "VLR_Authenticate",
        .states = auth_fsm_states,
        .num_states = ARRAY_SIZE(auth_fsm_states),
@@ -614,6 +614,16 @@
        .cleanup = auth_fsm_cleanup,
 };

+void vlr_auth_fsm_init(void)
+{
+       OSMO_ASSERT(osmo_fsm_register(&vlr_auth_fsm) == 0);
+}
+
+void vlr_auth_fsm_set_log_subsys(int log_level)
+{
+       vlr_auth_fsm.log_subsys = log_level;
+}
+
 /***********************************************************************
  * User API (for SGSN/MSC code)
  ***********************************************************************/
diff --git a/src/libvlr/vlr_auth_fsm.h b/src/libvlr/vlr_auth_fsm.h
index 441a8ca..139f919 100644
--- a/src/libvlr/vlr_auth_fsm.h
+++ b/src/libvlr/vlr_auth_fsm.h
@@ -29,8 +29,6 @@
        VLR_AUTH_E_MS_ID_IMSI,
 };

-extern struct osmo_fsm vlr_auth_fsm;
-
 struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub,
                                     struct osmo_fsm_inst *parent,
                                     uint32_t parent_event_success,
@@ -39,4 +37,6 @@
                                     bool is_r99,
                                     bool is_utran);

+void vlr_auth_fsm_init(void);
+void vlr_auth_fsm_set_log_subsys(int log_level);
 bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq);

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38413?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Iec85f299cd99879475ab094998433d935e980394
Gerrit-Change-Number: 38413
Gerrit-PatchSet: 9
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to