From cc447afe3475a60c4745206ee219e20aa60494bd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 28 Feb 2018 23:16:02 +0100 Subject: 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 --- src/target/fake_trx/ctrl_if_bb.py | 6 ++---- src/target/fake_trx/ctrl_if_bts.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/target/fake_trx/ctrl_if_bb.py b/src/target/fake_trx/ctrl_if_bb.py index c4d879c0..c0c2fb7c 100644 --- a/src/target/fake_trx/ctrl_if_bb.py +++ b/src/target/fake_trx/ctrl_if_bb.py @@ -138,8 +138,7 @@ class CTRLInterfaceBB(CTRLInterface): 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 @@ class CTRLInterfaceBB(CTRLInterface): # 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 f27b87d2..e0a6adab 100644 --- a/src/target/fake_trx/ctrl_if_bts.py +++ b/src/target/fake_trx/ctrl_if_bts.py @@ -106,8 +106,7 @@ class CTRLInterfaceBTS(CTRLInterface): 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 @@ class CTRLInterfaceBTS(CTRLInterface): # 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: -- cgit v1.2.3