diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-03-26 15:38:31 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-03-27 14:42:40 +0200 |
commit | ba06cc6cb84531155d246f7fce576f1d103ed7ed (patch) | |
tree | 02024fd35b96aca1b62c40e0bd04b07ab27bfd94 /openbsc/src/osmo-bsc/osmo_bsc_bssap.c | |
parent | 408856088bcf376f5317803fd8d1747f8b920054 (diff) |
bsc: Improve handling of paging_request return value
Detail better in the API documentation what's the expected return value
for paging_request.
Change-Id: I17fa3b549bff297531b2777d658b0e0112a3031f
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_bssap.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_bssap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 349c98f3c..26278d96c 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -138,6 +138,7 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, uint8_t data_length; const uint8_t *data; uint8_t chan_needed = RSL_CHANNEED_ANY; + int rc; tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); @@ -199,8 +200,14 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, subscr->tmsi = tmsi; LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac); - bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, + rc = bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, subscr, chan_needed, msc); + if (rc <= 0) { + LOGP(DMSC, LOGL_ERROR, "Paging request failed (%d): IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", + rc, mi_string, tmsi, tmsi, lac); + return -1; + } + return 0; } |