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.
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 5ee231c..88d43cd 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -44,8 +44,6 @@
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 */
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c
index a5df606..8e858c5 100644
--- a/openbsc/src/bsc_api.c
+++ b/openbsc/src/bsc_api.c
@@ -339,25 +339,6 @@
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)
{
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 66a9aaa..8e19b14 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -246,6 +246,7 @@
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 @@
}
while (1) {
- bsc_upqueue(bsc_gsmnet);
log_reset_context();
bsc_select_main(0);
}
diff --git a/openbsc/src/mncc.c b/openbsc/src/mncc.c
index 103ad76..d20b4ef 100644
--- a/openbsc/src/mncc.c
+++ b/openbsc/src/mncc.c
@@ -110,5 +110,7 @@
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);
}