[MERGED] osmocom-bb[fixeria/trx]: fake_trx: Send positive response to FAKE_TOA commands

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 1 11:03:12 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: fake_trx: Send positive response to FAKE_TOA commands
......................................................................


fake_trx: Send positive response to FAKE_TOA commands

Now that ctrl_if.py is capable of sending back the response to where
the command originated from, we can just as well send a positive
response back after executing the related commands.

Change-Id: Icba138835149a7264f4db3a6b05f54ca501c4d54
---
M src/target/fake_trx/ctrl_if_bb.py
M src/target/fake_trx/ctrl_if_bts.py
2 files changed, 4 insertions(+), 8 deletions(-)

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/target/fake_trx/ctrl_if_bb.py b/src/target/fake_trx/ctrl_if_bb.py
index c4d879c..c0c2fb7 100644
--- a/src/target/fake_trx/ctrl_if_bb.py
+++ b/src/target/fake_trx/ctrl_if_bb.py
@@ -138,8 +138,7 @@
 			self.burst_fwd.toa256_ul_base = int(request[1])
 			self.burst_fwd.toa256_ul_threshold = int(request[2])
 
-			# TODO: avoid sending response
-			return -1
+			return 0
 
 		# Timing of Arrival simulation for Uplink
 		# Relative form: CMD FAKE_TOA <+-BASE_DELTA>
@@ -149,8 +148,7 @@
 			# Parse and apply delta
 			self.burst_fwd.toa256_ul_base += int(request[1])
 
-			# TODO: avoid sending response
-			return -1
+			return 0
 
 		# Wrong / unknown command
 		else:
diff --git a/src/target/fake_trx/ctrl_if_bts.py b/src/target/fake_trx/ctrl_if_bts.py
index f27b87d..e0a6ada 100644
--- a/src/target/fake_trx/ctrl_if_bts.py
+++ b/src/target/fake_trx/ctrl_if_bts.py
@@ -106,8 +106,7 @@
 			self.burst_fwd.toa256_dl_base = int(request[1])
 			self.burst_fwd.toa256_dl_threshold = int(request[2])
 
-			# TODO: avoid sending response
-			return -1
+			return 0
 
 		# Timing of Arrival simulation for Downlink
 		# Relative form: CMD FAKE_TOA <+-BASE_DELTA>
@@ -117,8 +116,7 @@
 			# Parse and apply delta
 			self.burst_fwd.toa256_dl_base += int(request[1])
 
-			# TODO: avoid sending response
-			return -1
+			return 0
 
 		# Wrong / unknown command
 		else:

-- 
To view, visit https://gerrit.osmocom.org/7012
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icba138835149a7264f4db3a6b05f54ca501c4d54
Gerrit-PatchSet: 4
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list