aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-07-28 19:24:42 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 13:10:38 +0200
commit47824541f04134e308e0bb5c0ab25e8f53037c39 (patch)
treecb8a6258b10cd1e24dafca17348d87527a6d9d19 /openbsc
parentad2946ce03e22e8e9276620b7a11836c9f938355 (diff)
osmo-bsc: Allow location tstamp to be zero if fix is invalid
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index aa53eef07..778395c19 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -303,8 +303,8 @@ static int verify_net_loc(struct ctrl_cmd *cmd, const char *value, void *data)
height = atof(heightstr);
talloc_free(tmp);
- if ((age == 0) || (lat < -90) || (lat > 90) || (lon < -180) ||
- (lon > 180) || (valid < 0) || (valid > 2))
+ if (((age == 0) && (valid !=0)) || (lat < -90) || (lat > 90) ||
+ (lon < -180) || (lon > 180) || (valid < 0) || (valid > 2))
return 1;
return 0;