Change in osmo-pcu[master]: Fix several calls to LOGPAL

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

pespin gerrit-no-reply at lists.osmocom.org
Fri Oct 23 15:26:16 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/20850 )


Change subject: Fix several calls to LOGPAL
......................................................................

Fix several calls to LOGPAL

In those cases since a string pointer was passed, it always printed
"single" instead of whatever really was being used, since the string
pointer was not NULL.

Change-Id: Idab7d18e8f519e10fc3df4007634661c46f9256d
---
M src/gprs_rlcmac_ts_alloc.cpp
M tests/alloc/AllocTest.err
M tests/tbf/TbfTest.err
3 files changed, 28 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/50/20850/1

diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index a1c0838..9551c59 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -363,7 +363,7 @@
 
 	trx_no = find_trx(bts, ms, use_trx);
 	if (trx_no < 0) {
-		LOGPAL(tbf, "A", single ? "single" : "multi", use_trx, LOGL_NOTICE,
+		LOGPAL(tbf, "A", single, use_trx, LOGL_NOTICE,
 		       "failed to find a usable TRX (TFI exhausted)\n");
 		return trx_no;
 	}
@@ -392,13 +392,13 @@
 		&tfi, &usf);
 
 	if (tbf->direction == GPRS_RLCMAC_UL_TBF && usf < 0) {
-		LOGPAL(tbf, "A", single ? "single" : "multi", use_trx, LOGL_NOTICE,
+		LOGPAL(tbf, "A", single, use_trx, LOGL_NOTICE,
 		       "failed to allocate a TS, no USF available\n");
 		return -EBUSY;
 	}
 
 	if (ts < 0) {
-		LOGPAL(tbf, "A", single ? "single" : "multi", use_trx, LOGL_NOTICE,
+		LOGPAL(tbf, "A", single, use_trx, LOGL_NOTICE,
 		       "failed to allocate a TS, no TFI available\n");
 		return -EBUSY;
 	}
diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err
index 3549793..395e38f 100644
--- a/tests/alloc/AllocTest.err
+++ b/tests/alloc/AllocTest.err
@@ -193,7 +193,7 @@
 TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=0/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
@@ -305,7 +305,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 00
 Allocating UL TBF: MS_CLASS=0/0
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) free
@@ -713,7 +713,7 @@
 TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 10
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=0/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
@@ -931,7 +931,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 4
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
 Allocating UL TBF: MS_CLASS=0/0
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
@@ -189959,7 +189959,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 7
 TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 Allocating UL TBF: MS_CLASS=1/0
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 Allocating UL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 5
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 20, dl_slots = 00
@@ -190961,7 +190961,7 @@
 TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=36/0
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 Allocating DL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 3
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
@@ -191176,7 +191176,7 @@
 TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 3
 TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
 Allocating UL TBF: MS_CLASS=1/0
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 Allocating DL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 5
@@ -191573,7 +191573,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 7
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 Allocating UL TBF: MS_CLASS=10/0
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
@@ -192701,7 +192701,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=1/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 Allocating UL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 5
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 20, dl_slots = 00
@@ -193666,7 +193666,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=10/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 Allocating DL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 3
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
@@ -193916,7 +193916,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 3
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
 Allocating UL TBF: MS_CLASS=1/0
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 Allocating DL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 5
@@ -194411,7 +194411,7 @@
 Allocating UL TBF: MS_CLASS=10/0
 No TFI available (suggested TRX: 0).
 [UL] algo B <multi> (suggested TRX: 0): failed to allocate a TFI
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
@@ -194519,7 +194519,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 7
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 00
 Allocating UL TBF: MS_CLASS=1/0
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 Allocating UL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 5
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 20, dl_slots = 00
@@ -194738,7 +194738,7 @@
 Allocating UL TBF: MS_CLASS=10/0
 No TFI available (suggested TRX: -1).
 [UL] algo B <multi> (suggested TRX: -1): failed to allocate a TFI
-[UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: -1): failed to allocate a TS, no USF available
 Allocating DL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 3
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 08
@@ -195225,7 +195225,7 @@
 TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=1/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 Allocating DL TBF: MS_CLASS=10/0
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 5
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 20, dl_slots = 78
@@ -195702,7 +195702,7 @@
 TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=10/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 08, dl_slots = 00
@@ -196829,7 +196829,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=23/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 160 TBFs (previously -1)
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
@@ -196937,7 +196937,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 7
 TBF(TFI=6 TLLI=0xc0000022 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 00
 Allocating UL TBF: MS_CLASS=36/0
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
   Allocated 35 TBFs (previously 160)
 TBF(TFI=0 TLLI=0xc0000000 DIR=UL STATE=NULL) free
 Allocating UL TBF: MS_CLASS=1/0
@@ -198415,7 +198415,7 @@
 TBF(TFI=0 TLLI=0xc000009f DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=23/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 160 TBFs (previously 160)
 TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=RELEASING) free
 Allocating DL TBF: MS_CLASS=1/0
@@ -199218,7 +199218,7 @@
 TBF(TFI=31 TLLI=0xc000009f DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=23/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 160 TBFs (previously 160)
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
@@ -200696,7 +200696,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=44/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 89 TBFs (previously -1)
 Allocating UL TBF: MS_CLASS=1/0
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 3
@@ -200771,7 +200771,7 @@
 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) Setting Control TS 4
 TBF(TFI=6 TLLI=0xc0000017 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
 Allocating UL TBF: MS_CLASS=25/0
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
   Allocated 24 TBFs (previously 89)
 TBF(TFI=0 TLLI=0xc0000000 DIR=UL STATE=NULL) free
 Allocating UL TBF: MS_CLASS=1/0
@@ -202026,7 +202026,7 @@
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) free
 No TFI available (suggested TRX: 0).
 Allocating UL TBF: MS_CLASS=23/0
-[UL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[UL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 160 TBFs (previously 89)
 TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=RELEASING) free
 Allocating DL TBF: MS_CLASS=1/0
@@ -202829,7 +202829,7 @@
 TBF(TFI=31 TLLI=0xc000009f DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 80, dl_slots = 80
 No TFI available (suggested TRX: 0).
 Allocating DL TBF: MS_CLASS=23/0
-[DL] algo A <single> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
+[DL] algo A <multi> (suggested TRX: -1): failed to find a usable TRX (TFI exhausted)
   Allocated 160 TBFs (previously 160)
 Allocating DL TBF: MS_CLASS=11/11
 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) Setting Control TS 6
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index fa53925..9b119c1 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -7919,7 +7919,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because no USF available
-[UL] algo A <single> (suggested TRX: 0): failed to allocate a TS, no USF available
+[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 No PDCH resource
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
 Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN)

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idab7d18e8f519e10fc3df4007634661c46f9256d
Gerrit-Change-Number: 20850
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201023/88419230/attachment.htm>


More information about the gerrit-log mailing list