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: I4db4a668f2be07f3d55f848d38d1b490d8a7a685
This commit is contained in:
parent
d0a887b28b
commit
a01e2ee177
|
@ -365,7 +365,7 @@ static int gprs_bssgp_pcu_rcvmsg(struct msgb *msg)
|
|||
|
||||
if (bctx)
|
||||
{
|
||||
log_set_context(LOGGING_CTX_GB_BVC, bctx);
|
||||
log_set_context(LOG_CTX_GB_BVC, bctx);
|
||||
rate_ctr_inc(&bctx->ctrg->ctr[BSSGP_CTR_PKTS_IN]);
|
||||
rate_ctr_add(&bctx->ctrg->ctr[BSSGP_CTR_BYTES_IN], msgb_bssgp_len(msg));
|
||||
}
|
||||
|
|
|
@ -49,17 +49,17 @@ static const struct log_info_cat default_categories[] = {
|
|||
static int filter_fn(const struct log_context *ctx,
|
||||
struct log_target *tar)
|
||||
{
|
||||
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];
|
||||
const struct gprs_nsvc *nsvc = (const struct gprs_nsvc*)ctx->ctx[LOG_CTX_GB_NSVC];
|
||||
const struct gprs_nsvc *bvc = (const struct gprs_nsvc*)ctx->ctx[LOG_CTX_GB_BVC];
|
||||
|
||||
/* 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 BVC */
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue