introduce new signal every time we get a mobile identity

This commit is contained in:
Harald Welte 2009-12-13 12:39:18 +01:00
parent eab84a112c
commit 7659de1bcb
2 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,7 @@ enum signal_lchan {
enum signal_subscr {
S_SUBSCR_ATTACHED,
S_SUBSCR_DETACHED,
S_SUBSCR_IDENTITY, /* we've received some identity information */
};
/* SS_SCALL signals */

View File

@ -954,6 +954,8 @@ static int mm_rx_id_resp(struct msgb *msg)
DEBUGP(DMM, "IDENTITY RESPONSE: mi_type=0x%02x MI(%s)\n",
mi_type, mi_string);
dispatch_signal(SS_SUBSCR, S_SUBSCR_IDENTITY, gh->data);
switch (mi_type) {
case GSM_MI_TYPE_IMSI:
/* look up subscriber based on IMSI, create if not found */
@ -1034,6 +1036,8 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
DEBUGPC(DMM, "mi_type=0x%02x MI(%s) type=%s ", mi_type, mi_string,
lupd_name(lu->type));
dispatch_signal(SS_SUBSCR, S_SUBSCR_IDENTITY, &lu->mi_len);
/*
* Pseudo Spoof detection: Just drop a second/concurrent
* location updating request.
@ -1317,6 +1321,8 @@ static int gsm48_rx_mm_serv_req(struct msgb *msg)
DEBUGPC(DMM, "serv_type=0x%02x mi_type=0x%02x M(%s)\n",
req->cm_service_type, mi_type, mi_string);
dispatch_signal(SS_SUBSCR, S_SUBSCR_IDENTITY, (classmark2 + classmark2_len));
if (is_siemens_bts(bts))
send_siemens_mrpci(msg->lchan, classmark2-1);