Change in osmo-sgsn[master]: gb_proxy: More precise + readable log messages

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/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Dec 1 11:56:57 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21405 )

Change subject: gb_proxy: More precise + readable log messages
......................................................................

gb_proxy: More precise + readable log messages

* use string representations instead of magic numbers whenever possible
* make text actually describe the specific case, rather than copy+paste
* proper order (foobar indication) not (indication ..... foobar)

Change-Id: I232038da26a9963763c5fc9051b87c9182b27d94
---
M src/gbproxy/gb_proxy.c
1 file changed, 7 insertions(+), 11 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index bd58617..997085b 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1545,10 +1545,8 @@
 		LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d became unavailable\n", nsp->nsei);
 		break;
 	default:
-		LOGP(DPCU, LOGL_NOTICE,
-		     "NS: %s Unknown prim %d from NS\n",
-		     get_value_string(osmo_prim_op_names, nsp->oph.operation),
-		     nsp->oph.primitive);
+		LOGP(DPCU, LOGL_NOTICE, "NS: Unknown NS-STATUS.ind cause=%s from NS\n",
+		     gprs_ns2_aff_cause_prim_str(nsp->u.status.cause));
 		break;
 	}
 }
@@ -1567,9 +1565,8 @@
 	nsp = container_of(oph, struct osmo_gprs_ns2_prim, oph);
 
 	if (oph->operation != PRIM_OP_INDICATION) {
-		LOGP(DPCU, LOGL_NOTICE, "NS: %s Unknown prim %d from NS\n",
-		     get_value_string(osmo_prim_op_names, oph->operation),
-		     oph->operation);
+		LOGP(DPCU, LOGL_NOTICE, "NS: Unexpected primitive operation %s from NS\n",
+		     get_value_string(osmo_prim_op_names, oph->operation));
 		return 0;
 	}
 
@@ -1587,10 +1584,9 @@
 		gprs_ns_prim_status_cb(cfg, nsp);
 		break;
 	default:
-		LOGP(DPCU, LOGL_NOTICE,
-		     "NS: %s Unknown prim %d from NS\n",
-		     get_value_string(osmo_prim_op_names, oph->operation),
-		     oph->primitive);
+		LOGP(DPCU, LOGL_NOTICE, "NS: Unknown prim %s %s from NS\n",
+		     gprs_ns2_prim_str(oph->primitive),
+		     get_value_string(osmo_prim_op_names, oph->operation));
 		break;
 	}
 

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I232038da26a9963763c5fc9051b87c9182b27d94
Gerrit-Change-Number: 21405
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201201/95c95e54/attachment.htm>


More information about the gerrit-log mailing list