diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-23 18:00:51 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-23 18:11:57 +0100 |
commit | 89a8e722ed57618a64a7cc0b0c644ed8d4d11da5 (patch) | |
tree | 690f6a0965cf40eb1a79d81737d2e47adde11ea0 /openbsc/src/libcommon | |
parent | 94f49a4f08a963d473e9ab2c935d9cafa58f9067 (diff) |
logging fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*
In libosmocore, my patch was merged to master a bit too soon. To accomodate the
request for naming that matches the general "LOG" prefix instead of "LOGGING",
a fixup was committed to libosmocore. Adjust for that.
Original patch: change-id I5c343630020f4b108099696fd96c2111614c8067
The fixup: change-id I424fe3f12ea620338902b2bb8230544bde3f1a93
Change-Id: Ib2ec5e4884aa90f48051ee2f832af557aa525991
Diffstat (limited to 'openbsc/src/libcommon')
-rw-r--r-- | openbsc/src/libcommon/debug.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/openbsc/src/libcommon/debug.c b/openbsc/src/libcommon/debug.c index 3f3232c46..4d7bfed68 100644 --- a/openbsc/src/libcommon/debug.c +++ b/openbsc/src/libcommon/debug.c @@ -179,22 +179,22 @@ 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[LOGGING_CTX_VLR_SUBSCR]; - const struct gprs_nsvc *nsvc = ctx->ctx[LOGGING_CTX_GB_NSVC]; - const struct gprs_nsvc *bvc = ctx->ctx[LOGGING_CTX_GB_BVC]; + const struct gsm_subscriber *subscr = ctx->ctx[LOG_CTX_VLR_SUBSCR]; + const struct gprs_nsvc *nsvc = ctx->ctx[LOG_CTX_GB_NSVC]; + const struct gprs_nsvc *bvc = ctx->ctx[LOG_CTX_GB_BVC]; - if ((tar->filter_map & (1 << LOGGING_FILTER_VLR_SUBSCR)) != 0 - && subscr && subscr == tar->filter_data[LOGGING_FILTER_VLR_SUBSCR]) + if ((tar->filter_map & (1 << LOG_FLT_VLR_SUBSCR)) != 0 + && subscr && subscr == tar->filter_data[LOG_FLT_VLR_SUBSCR]) return 1; /* Filter on the NS Virtual Connection */ - if ((tar->filter_map & (1 << LOGGING_FILTER_GB_NSVC)) != 0 - && nsvc && (nsvc == tar->filter_data[LOGGING_FILTER_GB_NSVC])) + if ((tar->filter_map & (1 << LOG_FLT_GB_NSVC)) != 0 + && nsvc && (nsvc == tar->filter_data[LOG_FLT_GB_NSVC])) return 1; /* Filter on the NS Virtual Connection */ - if ((tar->filter_map & (1 << LOGGING_FILTER_GB_BVC)) != 0 - && bvc && (bvc == tar->filter_data[LOGGING_FILTER_GB_BVC])) + if ((tar->filter_map & (1 << LOG_FLT_GB_BVC)) != 0 + && bvc && (bvc == tar->filter_data[LOG_FLT_GB_BVC])) return 1; return 0; @@ -208,7 +208,7 @@ const struct log_info log_info = { void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subscr) { - struct gsm_subscriber **fsub = (void*)&target->filter_data[LOGGING_FILTER_VLR_SUBSCR]; + struct gsm_subscriber **fsub = (void*)&target->filter_data[LOG_FLT_VLR_SUBSCR]; /* free the old data */ if (*fsub) { @@ -217,8 +217,8 @@ void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subsc } if (subscr) { - target->filter_map |= (1 << LOGGING_FILTER_VLR_SUBSCR); + target->filter_map |= (1 << LOG_FLT_VLR_SUBSCR); *fsub = subscr_get(subscr); } else - target->filter_map &= ~(1 << LOGGING_FILTER_VLR_SUBSCR); + target->filter_map &= ~(1 << LOG_FLT_VLR_SUBSCR); } |