Improve page command handling in the bsc_hack
Add a callback to the gsm_network. When updating the location and
assigning a new tmsi callback into the bsc_hack.c and have a queue
of mobile stations to page, allocate a channel for and ultimately
dial.
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index 5c30a17..918116d 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -50,6 +50,8 @@
u_int16_t lac;
};
+
+
static void parse_lai(struct gsm_lai *lai, const struct gsm48_loc_area_id *lai48)
{
u_int8_t dig[4];
@@ -176,6 +178,7 @@
struct gsm48_hdr *gh;
struct gsm48_loc_area_id *lai;
u_int8_t *mid;
+ int ret;
msg->lchan = lchan;
@@ -195,7 +198,13 @@
gsm48_sendmsg(msg);
/* free the channel afterwards */
- return rsl_chan_release(lchan);
+ ret = rsl_chan_release(lchan);
+
+ /* inform the upper layer on the progress */
+ if (bts->network->update_request_accepted)
+ (*bts->network->update_request_accepted)(bts, tmsi);
+
+ return ret;
}
static char bcd2char(u_int8_t bcd)