lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/38107?usp=email )


Change subject: libvlr: replace direct call of paging_expired() into a callback
......................................................................

libvlr: replace direct call of paging_expired() into a callback

libmsc internal functions shouldn't be called from within the libvlr.
Re-use the paging callback with an osmocom specific indication to
inform it to cancel paging.

Change-Id: I7a3d15e8f0fb51c6b32add2de5024fc4d599ecf0
---
M src/libmsc/sgs_iface.c
M src/libvlr/vlr_sgs_fsm.c
2 files changed, 8 insertions(+), 3 deletions(-)



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

diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index a845ab8..c1b6b71 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -466,7 +466,7 @@
        }
 }

-/*! Page UE through SGs interface
+/*! Page UE through SGs interface or inform about an expired paging
  *  \param[in] vsub subscriber context
  *  \param[in] serv_ind service indicator (sms or voide)
  *  \returns 0 in case of success, -EINVAL in case of error. */
@@ -476,6 +476,11 @@
        struct gsm29118_paging_req paging_params;
        struct sgs_mme_ctx *mme;

+       if (serv_ind == SGSAP_SERV_IND_PAGING_TIMEOUT) {
+               paging_expired(vsub);
+               return 0;
+       }
+
        /* See also: 3GPP TS 29.118, chapter 5.1.2.2 Paging Initiation */
        if (vsub->sgs_fsm->state == SGS_UE_ST_NULL && 
vsub->conf_by_radio_contact_ind == true) {
                LOGPFSMSL(vsub->sgs_fsm, DPAG, LOGL_ERROR, "Will not Page 
(conf_by_radio_contact_ind == true)\n");
diff --git a/src/libvlr/vlr_sgs_fsm.c b/src/libvlr/vlr_sgs_fsm.c
index 2771cf5..12cad1b 100644
--- a/src/libvlr/vlr_sgs_fsm.c
+++ b/src/libvlr/vlr_sgs_fsm.c
@@ -64,8 +64,8 @@
        vlr_subscr_set_last_used_eutran_plmn_id(vsub, NULL);

        /* Make sure any ongoing paging is aborted. */
-       if (vsub->cs.is_paging)
-               paging_expired(vsub);
+       if (vsub->cs.is_paging && vsub->sgs.paging_cb)
+               vsub->sgs.paging_cb(vsub, SGSAP_SERV_IND_PAGING_TIMEOUT);

        /* Ensure that Ts5 (pending paging via SGs) is deleted */
        if (vlr_sgs_pag_pend(vsub))

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I7a3d15e8f0fb51c6b32add2de5024fc4d599ecf0
Gerrit-Change-Number: 38107
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>

Reply via email to