diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-04-27 02:08:07 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-02 17:03:36 +0200 |
commit | 28fdbdcd539004958c8ae4077ed28307edf9c747 (patch) | |
tree | 1f4426e084365a2b13d1c597448e27efb778ca1a | |
parent | 903ad2e135f5d6358042e60ab0f1288ff2e1f393 (diff) |
msc: paging: use gsm_subscriber API to add Integrity Protection for IuCS
During peliminary paging response testing, I introduced some code duplication.
Remove that and instead call the code that was there before 63b99ced83773d923
("add preliminary paging response handling, incomplete").
By calling the gsm_subscriber API, the connection is also secured and hence
Integrity Protection is enabled for IuCS.
-rw-r--r-- | openbsc/src/libmsc/gsm_04_08.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 2513659fb..657b9b4a9 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1227,8 +1227,6 @@ static int handle_paging_resp(struct msgb *msg, struct gsm_subscriber_connection *conn, struct gsm_subscriber *subscr) { - struct subscr_request *req, *req2; - if (!conn->subscr) { conn->subscr = subscr; } else if (conn->subscr != subscr) { @@ -1244,26 +1242,7 @@ static int handle_paging_resp(struct msgb *msg, osmo_counter_inc(conn->network->stats.paging.completed); - if (!subscr->is_paging) { - LOGP(DRR, LOGL_ERROR, "Paging Response received for subscriber that is not paging\n"); - return -1; - } - - llist_for_each_entry_safe(req, req2, &subscr->requests, entry) { - gsm_cbfn *cbfn = req->cbfn; - void *param = req->param; - - llist_del(&req->entry); - req = NULL; - - if (cbfn) { - LOGP(DPAG, LOGL_DEBUG, "Calling paging cbfn.\n"); - cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, conn, param); - } else - LOGP(DPAG, LOGL_DEBUG, "Paging without action.\n"); - } - return 0; + return subscr_rx_paging_response(msg, conn); } /* Receive a PAGING RESPONSE message from the MS */ |