diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-06 14:44:15 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-06 14:52:50 +0100 |
commit | 913bc032b9f1b18cdcf8f15bdb663879c415c762 (patch) | |
tree | 40c5dd55db481e76d36507c669d3ac6ab627e186 | |
parent | 59234a3eb28ef9c560518a18c956802a63589183 (diff) |
mncc: Move the cc_tx_to_mncc code into the libbsc.a
The trau_mux likes to call cc_tx_to_mncc for each received
frame from the E1 link. Using a signal for each audio frame
is messy as well. The best thing I could think of is to put
this into the BSC to deref the pointer. The other option would
be to include the gsm_data.h in the mncc.h header and have
the method as inline.
-rw-r--r-- | openbsc/src/Makefile.am | 2 | ||||
-rw-r--r-- | openbsc/src/mncc.c | 4 | ||||
-rw-r--r-- | openbsc/src/mncc_upqueue.c | 27 |
3 files changed, 28 insertions, 5 deletions
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index c86fc26c9..290bc0696 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -22,7 +22,7 @@ libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_data.c gsm_04_08_utils.c \ trau_frame.c trau_mux.c paging.c e1_config.c e1_input.c \ input/misdn.c input/ipaccess.c handover_logic.c \ talloc_ctx.c system_information.c rest_octets.c \ - bts_siemens_bs11.c bts_ipaccess_nanobts.c \ + bts_siemens_bs11.c bts_ipaccess_nanobts.c mncc_upqueue.c \ bts_unknown.c bsc_version.c bsc_api.c bsc_vty.c meas_rep.c gsm_04_80.c libmsc_a_SOURCES = gsm_subscriber.c db.c \ diff --git a/openbsc/src/mncc.c b/openbsc/src/mncc.c index 34093a8b1..3630b91b4 100644 --- a/openbsc/src/mncc.c +++ b/openbsc/src/mncc.c @@ -108,7 +108,3 @@ void mncc_set_cause(struct gsm_mncc *data, int loc, int val) data->cause.value = val; } -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/openbsc/src/mncc_upqueue.c b/openbsc/src/mncc_upqueue.c new file mode 100644 index 000000000..126072b2c --- /dev/null +++ b/openbsc/src/mncc_upqueue.c @@ -0,0 +1,27 @@ +/* mncc_upqueue.c - Pass msgb's up the chain */ + +/* (C) 2010 by Harald Welte <laforge@gnumonks.org> + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <openbsc/mncc.h> +#include <openbsc/gsm_data.h> + +void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg) +{ + net->mncc_recv(net, msg); +} |