diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-19 14:39:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-19 15:49:50 +0000 |
commit | c04d40477aa38b2d4b62bd0ffb48525f8f97e0cc (patch) | |
tree | 427500e94cbd3e4a34393282d4aa54d92d0f194e | |
parent | fa422556ad1833a8626b0536d21ebf19662857ec (diff) |
properly skip paging is OML link is down
If the OML link is found down while a paging request is issued,
no paging message is sent. However, we were still counting such
pagings as an actual attempt, and counted them towards the number
of available slots on the paging request queue.
Move the OML link check to the caller of page_ms() where the
accounting steps can be properly skipped as they should be.
Change-Id: I5b6db681da7d45c49e1f2f99d7789c8a29372ef3
Related: OS#2901
-rw-r--r-- | src/libbsc/paging.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 910a9b607..24be69243 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -80,10 +80,6 @@ static void page_ms(struct gsm_paging_request *request) unsigned int page_group; struct gsm_bts *bts = request->bts; - /* the bts is down.. we will just wait for the paging to expire */ - if (!bts->oml_link) - return; - log_set_context(LOG_CTX_BSC_SUBSCR, request->bsub); LOGP(DPAG, LOGL_INFO, "(bts=%d) Going to send paging commands: imsi: %s tmsi: " @@ -214,6 +210,10 @@ static void paging_handle_pending_requests(struct gsm_bts_paging_state *paging_b goto skip_paging; } + /* Skip paging if the bts is down. */ + if (!request->bts->oml_link) + goto skip_paging; + /* handle the paging request now */ page_ms(request); paging_bts->available_slots--; |