diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-02-12 14:43:27 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-03 16:19:10 +0100 |
commit | 292f1ce533e0e93dda1d05b178261fc807c8c0c8 (patch) | |
tree | 9ef8003c4ecaed2cfcc437a93c817865cc450202 /openbsc/src/libmsc | |
parent | 23e7f28c5c77a57aad5331c5e27b29e2eccfe7c3 (diff) |
mscsplit: fix compilation and comments. move msc_api.h.
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r-- | openbsc/src/libmsc/Makefile.am | 2 | ||||
-rw-r--r-- | openbsc/src/libmsc/gsm_04_08.c | 5 | ||||
-rw-r--r-- | openbsc/src/libmsc/iu_cs.c | 7 | ||||
-rw-r--r-- | openbsc/src/libmsc/msc_api.c | 5 | ||||
-rw-r--r-- | openbsc/src/libmsc/msc_api.h | 24 | ||||
-rw-r--r-- | openbsc/src/libmsc/msc_ifaces.c | 10 |
6 files changed, 16 insertions, 37 deletions
diff --git a/openbsc/src/libmsc/Makefile.am b/openbsc/src/libmsc/Makefile.am index fbbcbdc77..7f9e8ebd0 100644 --- a/openbsc/src/libmsc/Makefile.am +++ b/openbsc/src/libmsc/Makefile.am @@ -3,7 +3,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) \ AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) $(LIBSMPP34_CFLAGS) -noinst_HEADERS = meas_feed.h msc_api.h +noinst_HEADERS = meas_feed.h noinst_LIBRARIES = libmsc.a diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 8c4ae063c..f2065836e 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -63,9 +63,10 @@ #include <osmocom/core/talloc.h> #include <osmocom/gsm/tlv.h> +#include <openbsc/msc_ifaces.h> + #include <assert.h> -#include "msc_api.h" /* These debug statements were removed during the BSC/MSC split. It may make * sense to replace them with debug statements that do not access BTS data. */ @@ -104,7 +105,7 @@ static int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection gh->proto_discr = trans->protocol | (trans->transaction_id << 4); } - return msc_submit_dtap(conn, msg); + return msc_tx_dtap(conn, msg); } int gsm48_cc_tx_notify_ss(struct gsm_trans *trans, const char *message) diff --git a/openbsc/src/libmsc/iu_cs.c b/openbsc/src/libmsc/iu_cs.c index b0426e82c..e66a3c1df 100644 --- a/openbsc/src/libmsc/iu_cs.c +++ b/openbsc/src/libmsc/iu_cs.c @@ -4,12 +4,9 @@ #include <openbsc/debug.h> #include <openbsc/gsm_data.h> +#include <openbsc/msc_api.h> #include <openbsc/iu.h> -#include <openbsc/bsc_api.h> /* for BSC_API_CONN_POL_ACCEPT, TODO move that to libmsc */ - -#include "../libmsc/msc_api.h" - /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, struct ue_conn_ctx *ue) @@ -97,7 +94,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg) abort(); rc = msc_compl_l3(conn, msg, 0); - if (rc != BSC_API_CONN_POL_ACCEPT) { + if (rc != MSC_CONN_ACCEPT) { subscr_con_free(conn); rc = -1; } diff --git a/openbsc/src/libmsc/msc_api.c b/openbsc/src/libmsc/msc_api.c index e896b24c9..f02b4c669 100644 --- a/openbsc/src/libmsc/msc_api.c +++ b/openbsc/src/libmsc/msc_api.c @@ -24,8 +24,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <osmocom/core/logging.h> + +#include <openbsc/debug.h> + #include <openbsc/msc_api.h> #include <openbsc/gsm_data.h> +#include <openbsc/transaction.h> int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, uint16_t chosen_channel) diff --git a/openbsc/src/libmsc/msc_api.h b/openbsc/src/libmsc/msc_api.h deleted file mode 100644 index e3459a6ae..000000000 --- a/openbsc/src/libmsc/msc_api.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -/* These functions receive or send MM|CC|... messages from/to the BSC|RNC - * direction, while they are not concerned with which particular external - * interface is actually involved (A or IuCS). - * - * For the interface specific decisions see msc_iface.[hc] */ - -#include <stdint.h> - -struct gsm_subscriber_connection; -struct msgb; - -enum { - MSC_CONN_ACCEPT = 0, - MSC_CONN_REJECT = 1, -}; - -/* receive a Level 3 Complete message and return MSC_CONN_ACCEPT or - * MSC_CONN_REJECT */ -int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, - uint16_t chosen_channel); -/* TODO: is chosen_channel NITB legacy? */ - diff --git a/openbsc/src/libmsc/msc_ifaces.c b/openbsc/src/libmsc/msc_ifaces.c index 88100926d..0b4a554c9 100644 --- a/openbsc/src/libmsc/msc_ifaces.c +++ b/openbsc/src/libmsc/msc_ifaces.c @@ -28,17 +28,17 @@ static int tx_dummy_a(struct msgb *msg, uint8_t sapi) { LOGP(DMSC, LOGL_ERROR, "attempt to send message via uninitialized A-interface\n"); - return -1 + return -1; } static int tx_dummy_iu_cs(struct msgb *msg, uint8_t sapi) { LOGP(DMSC, LOGL_ERROR, "attempt to send message via uninitialized IuCS-interface\n"); - return -1 + return -1; } -struct msc_ifaces *global_msc_ifaces = { +struct msc_ifaces global_msc_ifaces = { .a = { .tx = tx_dummy_a, }, @@ -57,7 +57,7 @@ static int msc_tx(struct msc_ifaces *ifaces, /* TODO: msg->dst = <A-iface token> */ return ifaces->a.tx(msg, 0); - case IFACE_IUCS: + case IFACE_IU: msg->dst = conn->iu.ue_ctx; return ifaces->iu_cs.tx(msg, 0); @@ -73,6 +73,6 @@ static int msc_tx(struct msc_ifaces *ifaces, int msc_tx_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg) { - msc_tx(global_msc_ifaces, conn, msg); + return msc_tx(&global_msc_ifaces, conn, msg); } |