aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs_rlcmac.cpp')
-rw-r--r--src/gprs_rlcmac.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index 879ea85d..4fb75f77 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -32,18 +32,20 @@ extern "C" {
extern void *tall_pcu_ctx;
-int gprs_rlcmac_paging_request(const uint8_t *mi, uint8_t mi_len, uint16_t pgroup)
+int gprs_rlcmac_paging_request(const struct osmo_mobile_identity *mi, uint16_t pgroup)
{
if (log_check_level(DRLCMAC, LOGL_NOTICE)) {
- struct osmo_mobile_identity omi = {};
char str[64];
- osmo_mobile_identity_decode(&omi, mi, mi_len, true);
- osmo_mobile_identity_to_str_buf(str, sizeof(str), &omi);
+ osmo_mobile_identity_to_str_buf(str, sizeof(str), mi);
LOGP(DRLCMAC, LOGL_NOTICE, "TX: [PCU -> BTS] Paging Request (CCCH) MI=%s\n", str);
}
bitvec *paging_request = bitvec_alloc(22, tall_pcu_ctx);
bitvec_unhex(paging_request, DUMMY_VEC);
- int plen = Encoding::write_paging_request(paging_request, mi, mi_len);
+ int plen = Encoding::write_paging_request(paging_request, mi);
+ if (plen <= 0) {
+ LOGP(DRLCMAC, LOGL_ERROR, "TX: [PCU -> BTS] Failed to encode Paging Request\n");
+ return -1;
+ }
pcu_l1if_tx_pch(paging_request, plen, pgroup);
bitvec_free(paging_request);