summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sccp/sccp.h5
-rw-r--r--src/sccp/sccp.c9
-rw-r--r--tests/sccp/Makefile.am2
-rw-r--r--tests/sccp/sccp_test.c5
4 files changed, 17 insertions, 4 deletions
diff --git a/include/sccp/sccp.h b/include/sccp/sccp.h
index a0cdf0b..b25e21f 100644
--- a/include/sccp/sccp.h
+++ b/include/sccp/sccp.h
@@ -174,4 +174,9 @@ struct sccp_parse_result {
int sccp_determine_msg_type(struct msgb *msg);
int sccp_parse_header(struct msgb *msg, struct sccp_parse_result *result);
+/*
+ * osmocore logging features
+ */
+void sccp_set_log_area(int log_area);
+
#endif
diff --git a/src/sccp/sccp.c b/src/sccp/sccp.c
index 3657080..e054df5 100644
--- a/src/sccp/sccp.c
+++ b/src/sccp/sccp.c
@@ -25,11 +25,13 @@
#include <string.h>
#include <osmocore/msgb.h>
-#include <openbsc/debug.h>
#include <osmocore/talloc.h>
+#include <osmocore/logging.h>
#include <sccp/sccp.h>
+// Unassigned debug area
+static int DSCCP = 0;
static void *tall_sccp_ctx;
static LLIST_HEAD(sccp_connections);
@@ -1423,3 +1425,8 @@ static __attribute__((destructor)) void on_dso_unload(void)
{
talloc_report_full(tall_sccp_ctx, stderr);
}
+
+void sccp_set_log_area(int log_area)
+{
+ DSCCP = log_area;
+}
diff --git a/tests/sccp/Makefile.am b/tests/sccp/Makefile.am
index b35693e..b7caf7d 100644
--- a/tests/sccp/Makefile.am
+++ b/tests/sccp/Makefile.am
@@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS)
noinst_PROGRAMS = sccp_test
sccp_test_SOURCES = sccp_test.c
-sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS)
+sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(LIBOSMOCORE_LIBS)
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c
index 3b9ef4e..b6cade3 100644
--- a/tests/sccp/sccp_test.c
+++ b/tests/sccp/sccp_test.c
@@ -23,12 +23,13 @@
*/
#include <stdio.h>
+#include <string.h>
#include <arpa/inet.h>
-#include <openbsc/gsm_data.h>
-#include <openbsc/debug.h>
+#include <osmocore/logging.h>
#include <osmocore/msgb.h>
+#include <osmocore/utils.h>
#include <sccp/sccp.h>