aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-28 14:20:27 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:09 +0100
commit71d1e17e5e0c420cf00ea759743b81aaff72136e (patch)
treea5bad1c6def4bca6f23aee526f29f869c71cf9f7 /openbsc/src/libmsc
parent2c9e65051c598a42d6a59490b67adb366929ac03 (diff)
cscn: call msc_compl_l3() from subscr_conn_allocate_iu()
Pubish msc_compl_l3() decl in new file libmsc/msc_api.h (but see comment). Call msc_compl_l3() when establishing a subscriber connection for IuCS. Remove bts from subscr_conn_allocate_iu() signature, use network, link_id and conn_id instead. Move subscr_conn_allocate_iu() to the top of the file, because it semantically belongs before subscr_conn_lookup_iu().
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/Makefile.am2
-rw-r--r--openbsc/src/libmsc/msc_api.h8
-rw-r--r--openbsc/src/libmsc/osmo_msc.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/Makefile.am b/openbsc/src/libmsc/Makefile.am
index 51958905c..b9efee597 100644
--- a/openbsc/src/libmsc/Makefile.am
+++ b/openbsc/src/libmsc/Makefile.am
@@ -2,7 +2,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
+noinst_HEADERS = meas_feed.h msc_api.h
noinst_LIBRARIES = libmsc.a
diff --git a/openbsc/src/libmsc/msc_api.h b/openbsc/src/libmsc/msc_api.h
new file mode 100644
index 000000000..d736b4d98
--- /dev/null
+++ b/openbsc/src/libmsc/msc_api.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#include <osmocom/core/msgb.h>
+#include <openbsc/gsm_data.h>
+
+/* TODO does this belong to openbsc/gsm_04_08.h ?? */
+int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
+ uint16_t chosen_channel);
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index ae1a35380..0331de552 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -42,8 +42,8 @@ static int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t ca
return 1;
}
-static int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
- uint16_t chosen_channel)
+int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
+ uint16_t chosen_channel)
{
gsm0408_new_conn(conn);
gsm0408_dispatch(conn, msg);