Change in osmo-sgsn[master]: gbproxy: Fix confusing log message in gbprox_relay2nse

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

daniel gerrit-no-reply at lists.osmocom.org
Tue Dec 22 10:43:50 UTC 2020


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21838 )


Change subject: gbproxy: Fix confusing log message in gbprox_relay2nse
......................................................................

gbproxy: Fix confusing log message in gbprox_relay2nse

This function is now used to transmit messages in both directions,
BSS->SGSN and SGSN->BSS.
Print the actual direction in the logs

Change-Id: I31682156dfe88f7ca121a711968e625caed8bd5e
Related: OS#4472
---
M src/gbproxy/gb_proxy.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/38/21838/1

diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index d84da1a..49841d2 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -145,11 +145,12 @@
 	struct gprs_ns2_inst *nsi = nse->cfg->nsi;
 	struct osmo_gprs_ns2_prim nsp = {};
 	struct msgb *msg = bssgp_msgb_copy(old_msg, "msgb_relay2nse");
+	char log_pfx[32];
 	uint32_t tlli;
 	int rc;
 
-	DEBUGP(DGPRS, "NSE(%05u/SGSN)-BVC(%05u) proxying SGSN->BSS NSE(%05u/BSS)\n",
-		msgb_nsei(msg), ns_bvci, nse->nsei);
+	snprintf(log_pfx, sizeof(log_pfx), "NSE(%05u/%s)-BVC(%05u/??)", msgb_nsei(msg), !nse->sgsn_facing ? "SGSN" : "BSS", ns_bvci);
+	DEBUGP(DGPRS, "%s proxying to NSE(%05u/%s)\n", log_pfx, nse->nsei, nse->sgsn_facing ? "SGSN" : "BSS");
 
 	nsp.bvci = ns_bvci;
 	nsp.nsei = nse->nsei;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21838
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I31682156dfe88f7ca121a711968e625caed8bd5e
Gerrit-Change-Number: 21838
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201222/a89ed0f2/attachment.htm>


More information about the gerrit-log mailing list