osmo-nitb: Send purge ms to reg-proxy and handle response
This commit is contained in:
parent
444a9b9304
commit
362a757f56
|
@ -16,6 +16,7 @@ int sup_read_cb(struct gprs_gsup_client *sup_client, struct msgb *msg);
|
|||
|
||||
int subscr_query_auth_info(struct gsm_subscriber *subscr);
|
||||
int subscr_location_update(struct gsm_subscriber *subscr);
|
||||
int subscr_purge_ms(struct gsm_subscriber *subscr);
|
||||
|
||||
int subscr_tx_sms_message(struct gsm_subscriber *subscr,
|
||||
struct gsm411_rp_hdr *rph);
|
||||
|
|
|
@ -1081,6 +1081,12 @@ static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct m
|
|||
_gsm48_rx_mm_serv_req_sec_cb, NULL);
|
||||
}
|
||||
|
||||
void gsm0408_purge_ms(struct gsm_subscriber *subscr) {
|
||||
if (subscr->group->net->auth_policy == GSM_AUTH_POLICY_REMOTE) {
|
||||
subscr_purge_ms(subscr);
|
||||
}
|
||||
}
|
||||
|
||||
static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, struct msgb *msg)
|
||||
{
|
||||
struct gsm_network *network = conn->network;
|
||||
|
@ -1119,6 +1125,7 @@ static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, s
|
|||
}
|
||||
|
||||
if (subscr) {
|
||||
gsm0408_purge_ms(subscr);
|
||||
subscr_update(subscr, conn->bts,
|
||||
GSM_SUBSCRIBER_UPDATE_DETACHED);
|
||||
DEBUGP(DMM, "Subscriber: %s\n", subscr_name(subscr));
|
||||
|
|
|
@ -47,6 +47,7 @@ extern struct llist_head *subscr_bsc_active_subscribers(void);
|
|||
int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq,
|
||||
gsm_cbfn *cb, void *cb_data);
|
||||
|
||||
void gsm0408_purge_ms(struct gsm_subscriber *subscr);
|
||||
|
||||
/*
|
||||
* Struct for pending channel requests. This is managed in the
|
||||
|
@ -364,6 +365,7 @@ static void subscr_expire_callback(void *data, long long unsigned int id)
|
|||
|
||||
LOGP(DMM, LOGL_NOTICE, "Expiring inactive subscriber %s (ID %llu)\n",
|
||||
subscr_name(s), id);
|
||||
gsm0408_purge_ms(s);
|
||||
s->lac = GSM_LAC_RESERVED_DETACHED;
|
||||
db_sync_subscriber(s);
|
||||
|
||||
|
|
|
@ -290,6 +290,13 @@ int subscr_location_update(struct gsm_subscriber *subscr)
|
|||
return subscr_tx_sup_message(subscr->group->net->hlr_sup_client, subscr, &gsup_msg);
|
||||
}
|
||||
|
||||
int subscr_purge_ms(struct gsm_subscriber *subscr)
|
||||
{
|
||||
struct gprs_gsup_message gsup_msg = {0};
|
||||
gsup_msg.message_type = GPRS_GSUP_MSGT_PURGE_MS_REQUEST;
|
||||
return subscr_tx_sup_message(subscr->group->net->hlr_sup_client, subscr, &gsup_msg);
|
||||
}
|
||||
|
||||
static int subscr_tx_sup_error_reply(struct gprs_gsup_client *sup_client,
|
||||
struct gsm_subscriber *subscr,
|
||||
struct gprs_gsup_message *gsup_orig,
|
||||
|
@ -364,6 +371,13 @@ static int subscr_handle_sup_upd_loc_res(struct gsm_subscriber *subscr,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int subscr_handle_sup_purge_ms_res(struct gsm_subscriber *subscr,
|
||||
struct gprs_gsup_message *gsup_msg)
|
||||
{
|
||||
LOGP(DSUP, LOGL_INFO, "SUP PURGE MS result OK for IMSI:%s\n", subscr->imsi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int check_cause(int cause)
|
||||
{
|
||||
switch (cause) {
|
||||
|
@ -565,6 +579,9 @@ static int subscr_rx_sup_message(struct gprs_gsup_client *sup_client, struct msg
|
|||
case GPRS_GSUP_MSGT_LOCATION_CANCEL_REQUEST:
|
||||
case GPRS_GSUP_MSGT_PURGE_MS_ERROR:
|
||||
case GPRS_GSUP_MSGT_PURGE_MS_RESULT:
|
||||
rc = subscr_handle_sup_purge_ms_res(subscr, &gsup_msg);
|
||||
break;
|
||||
|
||||
case GPRS_GSUP_MSGT_INSERT_DATA_REQUEST:
|
||||
case GPRS_GSUP_MSGT_DELETE_DATA_REQUEST:
|
||||
LOGGSUBSCRP(LOGL_ERROR, subscr,
|
||||
|
|
|
@ -136,6 +136,7 @@ void sms_alloc() {}
|
|||
void sms_free() {}
|
||||
void gsm_net_update_ctype(struct gsm_network *network) {}
|
||||
void gsm48_secure_channel() {}
|
||||
void gsm0408_purge_ms() {}
|
||||
void paging_request_stop() {}
|
||||
void vty_out() {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue