bsc_api: Move some parts over to the BSC API.
This commit is contained in:
parent
8e78fa7862
commit
2a9285c028
|
@ -1,6 +1,7 @@
|
|||
/* GSM 08.08 like API for OpenBSC. The bridge from MSC to BSC */
|
||||
|
||||
/* (C) 2010 by Holger Hans Peter Freyther
|
||||
* (C) 2009 by Harald Welte <laforge@gnumonks.org>
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
|
@ -31,3 +32,22 @@ int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn,
|
|||
msg->trx = msg->lchan->ts->trx;
|
||||
return rsl_data_request(msg, link_id);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
|
|
@ -2908,25 +2908,6 @@ int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id)
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/*
|
||||
* This will be ran by the linker when loading the DSO. We use it to
|
||||
* do system initialization, e.g. registration of signal handlers.
|
||||
|
|
Loading…
Reference in New Issue