bsc_api: Move debug context for subscriber into the bsc_api.c
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 24bc9ca..5017b5c 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -119,7 +119,6 @@
lchan = &ts->lchan[lch_idx];
log_set_context(BSC_CTX_LCHAN, lchan);
- log_set_context(BSC_CTX_SUBSCR, lchan->conn.subscr);
return lchan;
}
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c
index cac08be..74ae8f5 100644
--- a/openbsc/src/bsc_api.c
+++ b/openbsc/src/bsc_api.c
@@ -28,6 +28,7 @@
#include <openbsc/signal.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/chan_alloc.h>
+#include <openbsc/debug.h>
#include <osmocore/talloc.h>
@@ -94,6 +95,7 @@
conn = &msg->lchan->conn;
if (conn->allocated) {
+ log_set_context(BSC_CTX_SUBSCR, conn->subscr);
api->dtap(conn, msg);
} else {
/* accept the connection or close the lchan */