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
This commit is contained in:
Jacob Erlbeck 2014-08-18 17:26:04 +02:00 committed by Holger Hans Peter Freyther
parent 03ca10e863
commit 643d5228ed
1 changed files with 9 additions and 3 deletions

View File

@ -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;
}
}