Up on call released release the channel and take the next item
Once a call is released, release the gsm_lchan and move to the next item in pending_stations or wait for more work.
This commit is contained in:
parent
abade7af88
commit
2eafef599c
|
@ -151,6 +151,7 @@ struct gsm_network {
|
|||
void (*update_request_accepted)(struct gsm_bts *, u_int32_t);
|
||||
void (*channel_allocated)(struct gsm_lchan *bts, enum gsm_chreq_reason_t);
|
||||
void (*channel_response)(struct gsm_lchan *, int acked);
|
||||
void (*call_released)(struct gsm_lchan *);
|
||||
};
|
||||
|
||||
struct gsm_network *gsm_network_init(unsigned int num_bts, u_int16_t country_code,
|
||||
|
|
|
@ -53,6 +53,7 @@ static void bsc_hack_update_request_accepted(struct gsm_bts *bts, u_int32_t assi
|
|||
static void bsc_hack_channel_allocated(struct gsm_lchan *chan,
|
||||
enum gsm_chreq_reason_t reason);
|
||||
static void bsc_hack_channel_response(struct gsm_lchan *chan, int acked);
|
||||
static void bsc_hack_call_released(struct gsm_lchan *chan);
|
||||
|
||||
|
||||
/* The following definitions are for OM and NM packets that we cannot yet
|
||||
|
@ -645,6 +646,7 @@ static int bootstrap_network(void)
|
|||
gsmnet->update_request_accepted = bsc_hack_update_request_accepted;
|
||||
gsmnet->channel_allocated = bsc_hack_channel_allocated;
|
||||
gsmnet->channel_response = bsc_hack_channel_response;
|
||||
gsmnet->call_released = bsc_hack_call_released;
|
||||
|
||||
if (mi_setup(bts, 0, mi_cb) < 0)
|
||||
return -EIO;
|
||||
|
@ -875,6 +877,15 @@ static void bsc_hack_channel_response(struct gsm_lchan *lchan, int ack)
|
|||
}
|
||||
}
|
||||
|
||||
static void bsc_hack_call_released(struct gsm_lchan *lchan)
|
||||
{
|
||||
DEBUGP(DPAG, "Call released jumping to the next...\n");
|
||||
rsl_chan_release(lchan);
|
||||
|
||||
/* next!!! */
|
||||
pag_timer_cb(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/* parse options */
|
||||
|
|
|
@ -537,6 +537,7 @@ static int gsm0408_rcv_cc(struct msgb *msg)
|
|||
struct gsm48_hdr *gh = msgb_l3(msg);
|
||||
u_int8_t msg_type = gh->msg_type & 0xbf;
|
||||
struct gsm_call *call = &msg->lchan->call;
|
||||
struct gsm_network *network = msg->lchan->ts->trx->bts->network;
|
||||
int rc = 0;
|
||||
|
||||
switch (msg_type) {
|
||||
|
@ -548,6 +549,8 @@ static int gsm0408_rcv_cc(struct msgb *msg)
|
|||
/* Answer from MS to RELEASE */
|
||||
DEBUGP(DCC, "RELEASE COMPLETE (state->NULL)\n");
|
||||
call->state = GSM_CSTATE_NULL;
|
||||
if (network->call_released)
|
||||
(*network->call_released)(msg->lchan);
|
||||
break;
|
||||
case GSM48_MT_CC_ALERTING:
|
||||
DEBUGP(DCC, "ALERTING\n");
|
||||
|
|
Loading…
Reference in New Issue