From 28fdbdcd539004958c8ae4077ed28307edf9c747 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 27 Apr 2016 02:08:07 +0200 Subject: 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. --- openbsc/src/libmsc/gsm_04_08.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'openbsc') 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 */ -- cgit v1.2.3