summaryrefslogtreecommitdiff
path: root/gpxlogger.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-27 12:12:49 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-27 12:12:49 -0400
commitd0c9777345d50ac189f88914f3980b2fc8161035 (patch)
tree5a81aba36fc4fe8ac8aa3185b5f26118307bc719 /gpxlogger.c
parent8b79518d4627859ab8351f1fd01bbaaf0ecee8a9 (diff)
downloadgpsd-d0c9777345d50ac189f88914f3980b2fc8161035.tar.gz
More refactoring. Bring DBUS API closer to the generic one.
Diffstat (limited to 'gpxlogger.c')
-rw-r--r--gpxlogger.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gpxlogger.c b/gpxlogger.c
index d0032150..60ce409c 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -191,8 +191,14 @@ static void quit_handler(int signum)
static int dbus_mainloop(void)
{
+ int s;
+
print_gpx_header();
- return gps_dbus_open(conditionally_log_fix, &gpsdata);
+ if ((s = gps_dbus_open(&gpsdata)) == 0) {
+ gps_dbus_stream(&gpsdata, 0, conditionally_log_fix);
+ gps_dbus_mainloop();
+ }
+ return 0;
}
#endif /* defined(DBUS_EXPORT_ENABLE) && !defined(S_SPLINT_S) */