[S] Change in libosmocore[master]: gb: Avoid accessing struct log_target members directly
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41883?usp=email ) Change subject: gb: Avoid accessing struct log_target members directly ...................................................................... gb: Avoid accessing struct log_target members directly Change-Id: Idb2f7f3736f0a22a091a702e23ef7cf58e56cfa9 --- M src/gb/common_vty.c 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/83/41883/1 diff --git a/src/gb/common_vty.c b/src/gb/common_vty.c index ad3dea2..da88475 100644 --- a/src/gb/common_vty.c +++ b/src/gb/common_vty.c @@ -40,23 +40,23 @@ int gprs_log_filter_fn(const struct log_context *ctx, struct log_target *tar) { - const void *nse = ctx->ctx[LOG_CTX_GB_NSE]; - const void *nsvc = ctx->ctx[LOG_CTX_GB_NSVC]; - const void *bvc = ctx->ctx[LOG_CTX_GB_BVC]; + const void *nse = log_get_context(ctx, LOG_CTX_GB_NSE); + const void *nsvc = log_get_context(ctx, LOG_CTX_GB_NSVC); + const void *bvc = log_get_context(ctx, LOG_CTX_GB_BVC); /* Filter on the NS Entity */ - if ((tar->filter_map & (1 << LOG_FLT_GB_NSE)) != 0 - && nse && (nse == tar->filter_data[LOG_FLT_GB_NSE])) + if (log_get_filter(tar, LOG_FLT_GB_NSE) && + nse && (nse == log_get_filter_data(tar, LOG_FLT_GB_NSE))) 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])) + if (log_get_filter(tar, LOG_FLT_GB_NSVC) && + nsvc && (nsvc == log_get_filter_data(tar, LOG_FLT_GB_NSVC))) return 1; /* Filter on the BSSGP Virtual Connection */ - if ((tar->filter_map & (1 << LOG_FLT_GB_BVC)) != 0 - && bvc && (bvc == tar->filter_data[LOG_FLT_GB_BVC])) + if (log_get_filter(tar, LOG_FLT_GB_BVC) && + bvc && (bvc == log_get_filter_data(tar, LOG_FLT_GB_BVC))) return 1; return 0; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41883?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Idb2f7f3736f0a22a091a702e23ef7cf58e56cfa9 Gerrit-Change-Number: 41883 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>
participants (1)
-
pespin