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

laforge gerrit-no-reply at lists.osmocom.org
Thu Jun 20 16:54:46 UTC 2019


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

Change subject: libmsc/gsm_04_11.c: do not abuse LOG_TRANS() in gsm411_alloc_mt_trans()
......................................................................

libmsc/gsm_04_11.c: do not abuse LOG_TRANS() in gsm411_alloc_mt_trans()

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

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

Change-Id: I3c1e633aee5dd7cd0d367404a3def9cffe0b3baa
---
M src/libmsc/gsm_04_11.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 3a3ec8c..367cc6f 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -1097,13 +1097,13 @@
 					       struct vlr_subscr *vsub)
 {
 	struct msc_a *msc_a;
-	struct gsm_trans *trans = NULL;
+	struct gsm_trans *trans;
 	int tid;
 
 	/* Generate a new transaction ID */
 	tid = trans_assign_trans_id(net, vsub, TRANS_SMS);
 	if (tid == -1) {
-		LOG_TRANS(trans, LOGL_ERROR, "No available transaction IDs\n");
+		LOGP(DLSMS, LOGL_ERROR, "No available transaction IDs\n");
 		return NULL;
 	}
 

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I3c1e633aee5dd7cd0d367404a3def9cffe0b3baa
Gerrit-Change-Number: 14541
Gerrit-PatchSet: 3
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/20190620/d8abd20c/attachment.html>


More information about the gerrit-log mailing list