aboutsummaryrefslogtreecommitdiffstats
path: root/src/sba.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-07-18 12:50:18 +0200
committerHarald Welte <laforge@gnumonks.org>2016-09-09 06:37:04 +0000
commit9bbe1600cc02e1b538380393edb1dcdabe9247a2 (patch)
tree2f129366b22e1c5148f958522320bcdf524041e8 /src/sba.cpp
parent16ddc90eabad423d247753f7d89639659e049d35 (diff)
Fix Timing Advance handling
* initialize with invalid TA instead of making assumption that phone is located within 550 meters (TA=0) * only set valid TA Change-Id: Idfc40ff0c11bdac13d9e28fbfa4e95dfc6b735b0 Related: OS#1526
Diffstat (limited to 'src/sba.cpp')
-rw-r--r--src/sba.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sba.cpp b/src/sba.cpp
index 6aeeb7c..46c1431 100644
--- a/src/sba.cpp
+++ b/src/sba.cpp
@@ -26,6 +26,7 @@
extern "C" {
#include <osmocom/core/talloc.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
}
#include <errno.h>
@@ -55,6 +56,9 @@ int SBAController::alloc(
if (!sba)
return -ENOMEM;
+ if (!gsm48_ta_is_valid(ta))
+ return -EINVAL;
+
for (trx = 0; trx < 8; trx++) {
for (ts = 7; ts >= 0; ts--) {
pdch = &m_bts.bts_data()->trx[trx].pdch[ts];