diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-14 18:03:06 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-14 18:26:09 +0800 |
commit | 2a9285c028ce061128620382eb5e502669bb56ed (patch) | |
tree | 588f75f0ceca540bc916c23d9bbe7c3cc8aefa7b /openbsc/src/bsc_api.c | |
parent | 8e78fa7862b6adf5f668455dfb3ed09642ba8e6b (diff) |
bsc_api: Move some parts over to the BSC API.
Diffstat (limited to 'openbsc/src/bsc_api.c')
-rw-r--r-- | openbsc/src/bsc_api.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c index b504752e1..070606da5 100644 --- a/openbsc/src/bsc_api.c +++ b/openbsc/src/bsc_api.c @@ -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; +} |