Change in ...osmo-trx[master]: Transceiver: pullRadioVector(): Fix use of uninitialized value bi->tn

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
Mon Sep 9 08:28:05 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/15450


Change subject: Transceiver: pullRadioVector(): Fix use of uninitialized value bi->tn
......................................................................

Transceiver: pullRadioVector(): Fix use of uninitialized value bi->tn

Change-Id: Ia0f2b5a51040663d7e8219e6ed51e0513b876548
---
M Transceiver52M/Transceiver.cpp
1 file changed, 13 insertions(+), 13 deletions(-)



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

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 079d1d7..3901997 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -612,19 +612,6 @@
   burstTime = radio_burst->getTime();
   CorrType type = expectedCorrType(burstTime, chan);
 
-  /* Debug: dump bursts to disk */
-  /* bits 0-7  - chan 0 timeslots
-   * bits 8-15 - chan 1 timeslots */
-  if (mWriteBurstToDiskMask & ((1<<bi->tn) << (8*chan)))
-    writeToFile(radio_burst, chan);
-
-  /* No processing if the timeslot is off.
-   * Not even power level or noise calculation. */
-  if (type == OFF) {
-    delete radio_burst;
-    return false;
-  }
-
   /* Initialize struct bi */
   bi->nbits = 0;
   bi->fn = burstTime.FN();
@@ -638,6 +625,19 @@
   bi->tsc = 0;
   bi->ci = 0.0;
 
+  /* Debug: dump bursts to disk */
+  /* bits 0-7  - chan 0 timeslots
+   * bits 8-15 - chan 1 timeslots */
+  if (mWriteBurstToDiskMask & ((1<<bi->tn) << (8*chan)))
+    writeToFile(radio_burst, chan);
+
+  /* No processing if the timeslot is off.
+   * Not even power level or noise calculation. */
+  if (type == OFF) {
+    delete radio_burst;
+    return false;
+  }
+
   /* Select the diversity channel with highest energy */
   for (size_t i = 0; i < radio_burst->chans(); i++) {
     float pow = energyDetect(*radio_burst->getVector(i), 20 * mSPSRx);

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ia0f2b5a51040663d7e8219e6ed51e0513b876548
Gerrit-Change-Number: 15450
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/20190909/bd88d996/attachment.htm>


More information about the gerrit-log mailing list