neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20348 )

Change subject: refactor paging: introduce bsc_paging_start()
......................................................................

refactor paging: introduce bsc_paging_start()

Allow starting a paging from elsewhere than a BSSMAP Paging Request. For
upcoming Location Services (LCS), a BSSLAP TA Request from the SMLC may require
triggering a Paging.

Change-Id: Iaff91584699d163bd1963927280ff3a8ddd43073
---
M include/osmocom/bsc/paging.h
M src/osmo-bsc/osmo_bsc_bssap.c
M tests/handover/handover_test.c
3 files changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h
index 3dd5dc6..cebdce3 100644
--- a/include/osmocom/bsc/paging.h
+++ b/include/osmocom/bsc/paging.h
@@ -88,4 +88,5 @@
 void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc);
 void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc);

+int bsc_paging_start(struct bsc_paging_params *params);
 #endif
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 3c00d68..ad50122 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -293,7 +293,6 @@
                .msc = msc,
                .tmsi = GSM_RESERVED_TMSI,
        };
-       struct bsc_paging_params *params; // (tmp cosmetic shim, dropped in 
subsequent patch)

        tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 
0, 0);
        remain = payload_length - 1;
@@ -357,9 +356,13 @@
                LOG_PAGING(&paging, DMSC, LOGL_ERROR, "eMLPP IE present, but 
eMLPP is not handled\n");
        }

-       rate_ctr_inc(&msc->network->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]);
+       return bsc_paging_start(&paging);
+}

-       params = &paging;
+int bsc_paging_start(struct bsc_paging_params *params)
+{
+       rate_ctr_inc(&bsc_gsmnet->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]);
+
        switch (params->cil.id_discr) {
        case CELL_IDENT_NO_CELL:
                page_all_bts(params);
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index ba0ec21..bdf926d 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -48,6 +48,7 @@
 #include <osmocom/bsc/handover_fsm.h>
 #include <osmocom/bsc/bsc_msc_data.h>
 #include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/paging.h>

 void *ctx;

@@ -1798,6 +1799,8 @@
 void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb 
*msg, uint8_t chosen_encr) {}
 int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t 
chosen_channel)
 { return 0; }
+int bsc_paging_start(struct bsc_paging_params *params)
+{ return 0; }
 void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct 
msgb *msg) {}
 void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t 
rr_cause) {}
 void bsc_cm_update(struct gsm_subscriber_connection *conn,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20348
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iaff91584699d163bd1963927280ff3a8ddd43073
Gerrit-Change-Number: 20348
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to