Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12233


Change subject: LU: do not always invoke sub_pres_vlr_fsm_start()
......................................................................

LU: do not always invoke sub_pres_vlr_fsm_start()

sub_pres_vlr_fsm_start() starts the FSM, invokes the START event, and then this
FSM invariably always directly terminates when vsub->ms_not_reachable_flag ==
false.

So if it is false, there is not much use in instantiating a whole FSM instance
that just terminates again, we might as well directly issue the
parent-term-event and save some logging space.

The same condition is already in place in the vlr_proc_acc_fsm.c in
_proc_arq_vlr_node2_post_vlr() for CM Service Request and Paging Response. Now
also skip this for LU.

Change-Id: Id2303a795dfd381f76e94ff8ff2f495926ca8ba0
---
M src/libvlr/vlr_lu_fsm.c
1 file changed, 6 insertions(+), 1 deletion(-)



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

diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index 02e49e0..74a6939 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -413,7 +413,12 @@
        osmo_fsm_inst_state_chg(fi, LU_COMPL_VLR_S_WAIT_SUB_PRES,
                                LU_TIMEOUT_LONG, 0);

-       sub_pres_vlr_fsm_start(&lcvp->sub_pres_vlr_fsm, fi, vsub, 
LU_COMPL_VLR_E_SUB_PRES_COMPL);
+       /* If ms_not_reachable_flag == false, the sub_pres_vlr_fsm will anyway 
terminate straight away and dispatch
+        * LU_COMPL_VLR_E_SUB_PRES_COMPL to this fi, so we might as well skip 
that dance here and save some logging. */
+       if (vsub->ms_not_reachable_flag)
+               sub_pres_vlr_fsm_start(&lcvp->sub_pres_vlr_fsm, fi, vsub, 
LU_COMPL_VLR_E_SUB_PRES_COMPL);
+       else
+               osmo_fsm_inst_dispatch(fi, LU_COMPL_VLR_E_SUB_PRES_COMPL, NULL);
 }

 static void lu_compl_vlr_new_tmsi(struct osmo_fsm_inst *fi)

--
To view, visit https://gerrit.osmocom.org/12233
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2303a795dfd381f76e94ff8ff2f495926ca8ba0
Gerrit-Change-Number: 12233
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>

Reply via email to