Change in ...osmo-msc[master]: libmsc/gsm_09_11.c: do not abuse LOG_TRANS() in gsm0911_rcv_nc_ss()

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 17 21:55:35 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-msc/+/14501 )

Change subject: libmsc/gsm_09_11.c: do not abuse LOG_TRANS() in gsm0911_rcv_nc_ss()
......................................................................

libmsc/gsm_09_11.c: do not abuse LOG_TRANS() in gsm0911_rcv_nc_ss()

If we 100% sure that trans == NULL, it makes more sense to use
generic LOGP(DSS, LOGL_*, ...) call, so the logs can reflect
more information than such dummy prefix:

  trans(NULL NULL callref-0x0 tid-0) ...

Change-Id: I6b68a0f0b32eb126e0f7e914a314130254d28467
---
M src/libmsc/gsm_09_11.c
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index c7b2155..df0a9b4 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -135,8 +135,9 @@
 		 * a supplementary service.
 		 */
 		if (msg_type != GSM0480_MTYPE_REGISTER) {
-			LOG_TRANS(trans, LOGL_ERROR, "Rx wrong SS/USSD message type for new transaction: %s\n",
-				  gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type));
+			LOGP(DSS, LOGL_ERROR, "Rx %s message for non-existing transaction (tid-%u)\n",
+				  gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type),
+				  gsm48_hdr_trans_id(gh));
 			gsm48_tx_simple(msc_a,
 				GSM48_PDISC_NC_SS | (tid << 4),
 				GSM0480_MTYPE_RELEASE_COMPLETE);
@@ -145,7 +146,7 @@
 
 		trans = trans_alloc(net, vsub, TRANS_USSD, tid, new_callref++);
 		if (!trans) {
-			LOG_TRANS(trans, LOGL_ERROR, " -> No memory for trans\n");
+			LOGP(DSS, LOGL_ERROR, " -> No memory for trans\n");
 			gsm48_tx_simple(msc_a,
 				GSM48_PDISC_NC_SS | (tid << 4),
 				GSM0480_MTYPE_RELEASE_COMPLETE);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I6b68a0f0b32eb126e0f7e914a314130254d28467
Gerrit-Change-Number: 14501
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.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/20190617/ca6cf3a9/attachment.html>


More information about the gerrit-log mailing list