From 643d5228edd71f50a2ebb27854a4d5f3ff3b2835 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 18 Aug 2014 17:26:04 +0200 Subject: gbproxy: Add context info to log messages This mainly adds the NSEI to the messages, similar to log messages ogf the existing gbproxy code. Sponsored-by: On-Waves ehf --- openbsc/src/gprs/gb_proxy.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'openbsc/src/gprs/gb_proxy.c') diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 549d3d7ed..8bad721ef 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -1982,7 +1982,9 @@ patch_error: OSMO_ASSERT(err_ctr >= 0); rate_ctr_inc(&peer->ctrg->ctr[err_ctr]); LOGP(DGPRS, LOGL_ERROR, - "Failed to patch BSSGP message as requested: %s.\n", err_info); + "NSEI=%u(%s) failed to patch BSSGP message as requested: %s.\n", + msgb_nsei(msg), parse_ctx->to_bss ? "SGSN" : "BSS", + err_info); } /* patch BSSGP message */ @@ -2008,7 +2010,9 @@ static void gbprox_process_bssgp_ul(struct gbproxy_config *cfg, if (!rc) { if (!parse_ctx.need_decryption) { LOGP(DGPRS, LOGL_ERROR, - "Failed to parse BSSGP/GMM message\n"); + "NSEI=%u(BSS) patching: " + "failed to parse BSSGP/GMM message\n", + msgb_nsei(msg)); return; } } @@ -2071,7 +2075,9 @@ static void gbprox_process_bssgp_dl(struct gbproxy_config *cfg, if (!rc) { if (!parse_ctx.need_decryption) { LOGP(DGPRS, LOGL_ERROR, - "Failed to parse BSSGP/GMM message\n"); + "NSEI=%u(SGSN) patching: " + "failed to parse BSSGP/GMM message\n", + msgb_nsei(msg)); return; } } -- cgit v1.2.3