summaryrefslogtreecommitdiff
path: root/gpxlogger.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2017-09-05 21:21:46 -0400
committerEric S. Raymond <esr@thyrsus.com>2017-09-05 21:21:46 -0400
commit9bc5e34d886379e3bba67d7c421cd37c19e92b67 (patch)
tree9949f297228cb74eb75602673672ed62941509ec /gpxlogger.c
parentc7aa85ffec8cb7941e74b0ddefe4c1a8b8dfccf6 (diff)
downloadgpsd-9bc5e34d886379e3bba67d7c421cd37c19e92b67.tar.gz
Address Savannah bug #50930: gpxlogger track timeout cannot be changed
Diffstat (limited to 'gpxlogger.c')
-rw-r--r--gpxlogger.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gpxlogger.c b/gpxlogger.c
index 141b7486..fda37ff7 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -197,7 +197,6 @@ int main(int argc, char **argv)
bool reconnect = false;
unsigned int flags = WATCH_ENABLE;
struct exportmethod_t *method = NULL;
- const int GPS_TIMEOUT = 5000000; /* microseconds */
progname = argv[0];
@@ -338,10 +337,10 @@ int main(int argc, char **argv)
print_gpx_header();
- while (gps_mainloop(&gpsdata, GPS_TIMEOUT, conditionally_log_fix) < 0 &&
+ while (gps_mainloop(&gpsdata, timeout * 1000000, conditionally_log_fix) < 0 &&
reconnect) {
/* avoid busy-calling gps_mainloop() */
- (void)sleep(GPS_TIMEOUT / 1000000);
+ (void)sleep(timeout);
syslog(LOG_INFO, "timeout; about to reconnect");
}