MNCC: remove 'upqueue'
The MNCC messages now again get directly handled by the net->mncc_recv() callback. If the callee wants to put them in a queue, it' his business to do that.
This commit is contained in:
parent
fea236e27c
commit
e8e432dd59
|
@ -44,8 +44,6 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
|
|||
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
|
||||
u_int8_t power_command, u_int8_t ho_ref);
|
||||
|
||||
int bsc_upqueue(struct gsm_network *net);
|
||||
|
||||
int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg);
|
||||
|
||||
/* convert a ASCII phone number to call-control BCD */
|
||||
|
|
|
@ -339,25 +339,6 @@ int gsm0808_page(struct gsm_bts *bts, unsigned int page_group, unsigned int mi_l
|
|||
return rsl_paging_cmd(bts, page_group, mi_len, mi, chan_type);
|
||||
}
|
||||
|
||||
/* dequeue messages to layer 4 */
|
||||
int bsc_upqueue(struct gsm_network *net)
|
||||
{
|
||||
struct gsm_mncc *mncc;
|
||||
struct msgb *msg;
|
||||
int work = 0;
|
||||
|
||||
if (net)
|
||||
while ((msg = msgb_dequeue(&net->upqueue))) {
|
||||
mncc = (struct gsm_mncc *)msg->data;
|
||||
if (net->mncc_recv)
|
||||
net->mncc_recv(net, mncc->msg_type, mncc);
|
||||
work = 1; /* work done */
|
||||
talloc_free(msg);
|
||||
}
|
||||
|
||||
return work;
|
||||
}
|
||||
|
||||
static void handle_ass_compl(struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg)
|
||||
{
|
||||
|
|
|
@ -246,6 +246,7 @@ int main(int argc, char **argv)
|
|||
if (rc < 0)
|
||||
exit(1);
|
||||
bsc_api_init(bsc_gsmnet, msc_bsc_api());
|
||||
mncc_sock_init(bsc_gsmnet);
|
||||
|
||||
/* seed the PRNG */
|
||||
srand(time(NULL));
|
||||
|
@ -286,7 +287,6 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
bsc_upqueue(bsc_gsmnet);
|
||||
log_reset_context();
|
||||
bsc_select_main(0);
|
||||
}
|
||||
|
|
|
@ -110,5 +110,7 @@ void mncc_set_cause(struct gsm_mncc *data, int loc, int val)
|
|||
|
||||
void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg)
|
||||
{
|
||||
msgb_enqueue(&net->upqueue, msg);
|
||||
struct gsm_mncc *mncc = msgb_data(msg);
|
||||
|
||||
net->mncc_recv(net, mncc->msg_type, mncc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue