summaryrefslogtreecommitdiff
path: root/gpxlogger.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-19 08:19:16 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-19 08:19:16 -0500
commit468d2ad0f276b02dd131a574c087f8a797300c2a (patch)
treef443e9d8da07d66421e7dd624c65561e8eadb959 /gpxlogger.c
parent17a14ffaf734eb856abf29aa63058c9df79b7891 (diff)
downloadgpsd-468d2ad0f276b02dd131a574c087f8a797300c2a.tar.gz
Clients are no longer required to define a gpsd_report() hook.
Diffstat (limited to 'gpxlogger.c')
-rw-r--r--gpxlogger.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpxlogger.c b/gpxlogger.c
index 0b1f4acd..5dc82af4 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -134,7 +134,7 @@ static void conditionally_log_fix(struct gps_fix_t *gpsfix)
return;
/* may not be worth logging if we've moved only a very short distance */
- if (minmove && !first && earth_distance(gpsfix->latitude, gpsfix->longitude,
+ if (minmove>0 && !first && earth_distance(gpsfix->latitude, gpsfix->longitude,
old_lat, old_lon) < minmove)
return;
@@ -160,7 +160,7 @@ static void conditionally_log_fix(struct gps_fix_t *gpsfix)
}
old_int_time = int_time;
- if (minmove) {
+ if (minmove > 0) {
old_lat = gpsfix->latitude;
old_lon = gpsfix->longitude;
}
@@ -356,6 +356,7 @@ static void usage(void)
exit(1);
}
+/*@-mustfreefresh -globstate@*/
int main(int argc, char **argv)
{
int ch;
@@ -438,12 +439,14 @@ int main(int argc, char **argv)
(void)signal(SIGQUIT, quit_handler);
(void)signal(SIGINT, quit_handler);
+ /*@-unrecog@*/
/* might be time to daemonize */
if (daemonize) {
/* not SuS/POSIX portable, but we have our own fallback version */
if (daemon(0, 0) != 0)
(void) fprintf(stderr,"demonization failed: %s\n", strerror(errno));
}
+ /*@+unrecog@*/
//syslog (LOG_INFO, "---------- STARTED ----------");
@@ -459,3 +462,4 @@ int main(int argc, char **argv)
return socket_mainloop();
#endif
}
+/*@+mustfreefresh +globstate@*/