aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-07-28 19:24:42 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-08-22 19:24:34 +0200
commitd13f32ccd8aee2a0ef06ebee4fcec3a17b901f86 (patch)
tree90f0f4c8b2891fc5f6f535f4e48c14eebab32e10 /openbsc
parent505ccabd64f09563e5f176264ba59e4d13ae537d (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 43b17df50..e0ea5f7c2 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -321,8 +321,8 @@ 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;