summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libcommon/debug.c')
-rw-r--r--openbsc/src/libcommon/debug.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbsc/src/libcommon/debug.c b/openbsc/src/libcommon/debug.c
index 4d7bfed68..0f8221198 100644
--- a/openbsc/src/libcommon/debug.c
+++ b/openbsc/src/libcommon/debug.c
@@ -180,6 +180,7 @@ static const struct log_info_cat default_categories[] = {
static int filter_fn(const struct log_context *ctx, struct log_target *tar)
{
const struct gsm_subscriber *subscr = ctx->ctx[LOG_CTX_VLR_SUBSCR];
+ const struct bsc_subscr *bsub = ctx->ctx[LOG_CTX_BSC_SUBSCR];
const struct gprs_nsvc *nsvc = ctx->ctx[LOG_CTX_GB_NSVC];
const struct gprs_nsvc *bvc = ctx->ctx[LOG_CTX_GB_BVC];
@@ -187,6 +188,10 @@ static int filter_fn(const struct log_context *ctx, struct log_target *tar)
&& subscr && subscr == tar->filter_data[LOG_FLT_VLR_SUBSCR])
return 1;
+ if ((tar->filter_map & (1 << LOG_FLT_BSC_SUBSCR)) != 0
+ && bsub && bsub == tar->filter_data[LOG_FLT_BSC_SUBSCR])
+ return 1;
+
/* Filter on the NS Virtual Connection */
if ((tar->filter_map & (1 << LOG_FLT_GB_NSVC)) != 0
&& nsvc && (nsvc == tar->filter_data[LOG_FLT_GB_NSVC]))
@@ -206,7 +211,8 @@ const struct log_info log_info = {
.num_cat = ARRAY_SIZE(default_categories),
};
-void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subscr)
+void log_set_filter_vlr_subscr(struct log_target *target,
+ struct gsm_subscriber *vlr_subscr)
{
struct gsm_subscriber **fsub = (void*)&target->filter_data[LOG_FLT_VLR_SUBSCR];
@@ -216,9 +222,9 @@ void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subsc
*fsub = NULL;
}
- if (subscr) {
+ if (vlr_subscr) {
target->filter_map |= (1 << LOG_FLT_VLR_SUBSCR);
- *fsub = subscr_get(subscr);
+ *fsub = subscr_get(vlr_subscr);
} else
target->filter_map &= ~(1 << LOG_FLT_VLR_SUBSCR);
}