diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-17 17:18:04 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-17 17:23:36 +0100 |
commit | 4ae540695901e08aa3bfcb28af3389d53745dc5c (patch) | |
tree | 63631aae716f09e70479fde4733625b9475bfd80 /src/gprs_debug.cpp | |
parent | b609190369bdf96eefedacc012503d7b55823302 (diff) |
logging: use central filter and ctx consts from libosmocore
Change-Id: I7b41a5a26527864177c63403ad171d2987f0ff6a
Depends: libosmocore change-id I5c343630020f4b108099696fd96c2111614c8067
Diffstat (limited to 'src/gprs_debug.cpp')
-rw-r--r-- | src/gprs_debug.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index 3d9b8163..6bb35eaa 100644 --- a/src/gprs_debug.cpp +++ b/src/gprs_debug.cpp @@ -46,27 +46,20 @@ static const struct log_info_cat default_categories[] = { {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, }; -enum { - _FLT_ALL = LOG_FILTER_ALL, /* libosmocore */ - FLT_IMSI = 1, - FLT_NSVC = 2, - FLT_BVC = 3, -}; - static int filter_fn(const struct log_context *ctx, struct log_target *tar) { - const struct gprs_nsvc *nsvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_NSVC]; - const struct gprs_nsvc *bvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_BVC]; + const struct gprs_nsvc *nsvc = (const struct gprs_nsvc*)ctx->ctx[LOGGING_CTX_GB_NSVC]; + const struct gprs_nsvc *bvc = (const struct gprs_nsvc*)ctx->ctx[LOGGING_CTX_GB_BVC]; /* Filter on the NS Virtual Connection */ - if ((tar->filter_map & (1 << FLT_NSVC)) != 0 - && nsvc && (nsvc == tar->filter_data[FLT_NSVC])) + if ((tar->filter_map & (1 << LOGGING_FILTER_GB_NSVC)) != 0 + && nsvc && (nsvc == tar->filter_data[LOGGING_FILTER_GB_NSVC])) return 1; /* Filter on the BVC */ - if ((tar->filter_map & (1 << FLT_BVC)) != 0 - && bvc && (bvc == tar->filter_data[FLT_BVC])) + if ((tar->filter_map & (1 << LOGGING_FILTER_GB_BVC)) != 0 + && bvc && (bvc == tar->filter_data[LOGGING_FILTER_GB_BVC])) return 1; return 0; |