diff options
author | Harald Welte <laforge@netfilter.org> | 2009-12-13 12:39:18 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-12-13 12:39:18 +0100 |
commit | 7659de1bcbd22f48c41f76ea9e41dc71c9ed1cee (patch) | |
tree | 69542550de7c31ff506a690dde3e8f5fab5d6293 | |
parent | eab84a112c3ef8c35835a2ba23fa978fff4d218b (diff) |
introduce new signal every time we get a mobile identity
-rw-r--r-- | openbsc/include/openbsc/signal.h | 1 | ||||
-rw-r--r-- | openbsc/src/gsm_04_08.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h index d59bb9726..10fcddda3 100644 --- a/openbsc/include/openbsc/signal.h +++ b/openbsc/include/openbsc/signal.h @@ -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 */ diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index e1374c9ae..ce93f0130 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -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); |