diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-01-02 20:29:27 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-01-07 10:50:42 +0100 |
commit | 0e38ee8412f728b2970a84b4d60745fd20c8ac41 (patch) | |
tree | a2c98ea1a2a0901ffb5ce06ca2d3add48c5502a3 | |
parent | 1e7550ac28de989fadeb0827d056e899b3aacb66 (diff) |
HACK: paging resp handling split ...sylvain/encryption_testing
-rw-r--r-- | openbsc/include/openbsc/gsm_04_08.h | 1 | ||||
-rw-r--r-- | openbsc/src/gsm_04_08_utils.c | 24 |
2 files changed, 17 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h index 9c9894215..fae2f7553 100644 --- a/openbsc/include/openbsc/gsm_04_08.h +++ b/openbsc/include/openbsc/gsm_04_08.h @@ -792,6 +792,7 @@ extern const char *gsm0408_cc_msg_names[]; int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv); int gsm48_paging_extract_mi(struct msgb *msg, char *mi_string, u_int8_t *mi_type); int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr); +int gsm48_finish_paging_resp(struct gsm_lchan *lchan, struct gsm_subscriber *subscr); int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode); int gsm48_rx_rr_modif_ack(struct msgb *msg); diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c index d5785f971..ebba00d16 100644 --- a/openbsc/src/gsm_04_08_utils.c +++ b/openbsc/src/gsm_04_08_utils.c @@ -467,7 +467,6 @@ int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr) struct gsm_bts *bts = msg->lchan->ts->trx->bts; struct gsm48_hdr *gh = msgb_l3(msg); u_int8_t *classmark2_lv = gh->data + 1; - struct paging_signal_data sig_data; if (is_siemens_bts(bts)) send_siemens_mrpci(msg->lchan, classmark2_lv); @@ -484,17 +483,26 @@ int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr) subscr = msg->lchan->subscr; } - sig_data.subscr = subscr; - sig_data.bts = msg->lchan->ts->trx->bts; - sig_data.lchan = msg->lchan; - bts->network->stats.paging.completed++; + /* Disable paging */ + paging_request_pause(msg->trx->bts, subscr); + return 0; +} + +int gsm48_finish_paging_resp(struct gsm_lchan *lchan, struct gsm_subscriber *subscr) +{ + struct paging_signal_data sig_data; + + /* Dispatch signal */ + sig_data.subscr = subscr; + sig_data.bts = lchan->ts->trx->bts; + sig_data.lchan = lchan; + dispatch_signal(SS_PAGING, S_PAGING_SUCCEEDED, &sig_data); - /* Stop paging on the bts we received the paging response */ - paging_request_stop(msg->trx->bts, subscr, msg->lchan); - return 0; + /* Discard paging on the bts we received the paging response */ + paging_request_stop(lchan->ts->trx->bts, subscr, lchan); } /* Chapter 9.1.9: Ciphering Mode Command */ |