From 913bc032b9f1b18cdcf8f15bdb663879c415c762 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 6 Jan 2011 14:44:15 +0100 Subject: 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. --- openbsc/src/Makefile.am | 2 +- openbsc/src/mncc.c | 4 ---- openbsc/src/mncc_upqueue.c | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 openbsc/src/mncc_upqueue.c (limited to 'openbsc/src') 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 + * 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 . + * + */ + +#include +#include + +void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg) +{ + net->mncc_recv(net, msg); +} -- cgit v1.2.3