summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-28 23:16:02 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-01 11:49:15 +0100
commitcc447afe3475a60c4745206ee219e20aa60494bd (patch)
tree0e442fbd6ca3a6e5d58da9c7847371c5a7822514
parent4e74311b00363b2ba417d7ca3ed67abfab1eaec8 (diff)
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
-rw-r--r--src/target/fake_trx/ctrl_if_bb.py6
-rw-r--r--src/target/fake_trx/ctrl_if_bts.py6
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: