Change in libosmocore[master]: ns2: Print NS-STATUS.ind primitives to the log

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
Mon Feb 1 09:17:07 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22571 )

Change subject: ns2: Print NS-STATUS.ind primitives to the log
......................................................................

ns2: Print NS-STATUS.ind primitives to the log

Log the NS-STATUS primitives from within the library, so we don't have
to keep related code in each and every application.

Change-Id: I368883acfc8ea76529befcd429bf8f2445a60a94
---
M src/gb/gprs_ns2.c
1 file changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  lynxis lazus: Looks good to me, approved



diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 1f7525e..1cf2335 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -489,11 +489,18 @@
 	nsp.u.status.transfer = ns2_count_transfer_cap(nse, bvci);
 	nsp.u.status.first = nse->first;
 	nsp.u.status.persistent = nse->persistent;
-	if (nsvc)
+	if (nsvc) {
 		nsp.u.status.nsvc = gprs_ns2_ll_str_buf(nsvc_str, sizeof(nsvc_str), nsvc);
+		LOGNSVC(nsvc, LOGL_NOTICE, "NS-STATUS.ind(bvci=%05u): cause=%s, transfer=%d, first=%d\n",
+			nsp.bvci, gprs_ns2_aff_cause_prim_str(nsp.u.status.cause),
+			nsp.u.status.transfer, nsp.u.status.first);
+	} else {
+		LOGNSE(nse, LOGL_NOTICE, "NS-STATUS.ind(bvci=%05u): cause=%s, transfer=%d, first=%d\n",
+			nsp.bvci, gprs_ns2_aff_cause_prim_str(nsp.u.status.cause),
+			nsp.u.status.transfer, nsp.u.status.first);
+	}
 
-	osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_STATUS,
-			PRIM_OP_INDICATION, NULL);
+	osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_STATUS, PRIM_OP_INDICATION, NULL);
 	nse->nsi->cb(&nsp.oph, nse->nsi->cb_data);
 }
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I368883acfc8ea76529befcd429bf8f2445a60a94
Gerrit-Change-Number: 22571
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210201/5a1450a8/attachment.htm>


More information about the gerrit-log mailing list