diff options
author | Harald Welte <laforge@osmocom.org> | 2021-01-31 16:09:19 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2021-02-01 09:39:29 +0100 |
commit | 8669043fe9ac9f9f62e2f8d41dba4eae6f1fc97f (patch) | |
tree | 54a208b8578ecc95cda5d4a874ade129257aaa86 | |
parent | a3f73232882e8b5bcd5fdeaa358de64af01169ab (diff) |
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
-rw-r--r-- | src/gb/gprs_ns2.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 1f7525e0..1cf2335f 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -489,11 +489,18 @@ void ns2_prim_status_ind(struct gprs_ns2_nse *nse, 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); } |