diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 10:38:02 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 10:38:02 -0400 |
commit | 8b79518d4627859ab8351f1fd01bbaaf0ecee8a9 (patch) | |
tree | f12d0631081284fa45dad22de16f7af76d09e86b /libgps_dbus.c | |
parent | 20f16976a1a451c298fee36159daede7749760e6 (diff) | |
download | gpsd-8b79518d4627859ab8351f1fd01bbaaf0ecee8a9.tar.gz |
Refactoring step and minor fixes.
Diffstat (limited to 'libgps_dbus.c')
-rw-r--r-- | libgps_dbus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libgps_dbus.c b/libgps_dbus.c index 8f84e720..3c05705d 100644 --- a/libgps_dbus.c +++ b/libgps_dbus.c @@ -100,8 +100,6 @@ int gps_dbus_open(void (*handler)(struct gps_data_t *), struct gps_data_t *gpsda return -1; PRIVATE(gpsdata)->handler = handler; - mainloop = g_main_loop_new(NULL, FALSE); - dbus_error_init(&error); connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); if (dbus_error_is_set(&error)) { @@ -123,8 +121,9 @@ int gps_dbus_open(void (*handler)(struct gps_data_t *), struct gps_data_t *gpsda return 5; } + /* This probably needs to be factored out */ + mainloop = g_main_loop_new(NULL, FALSE); dbus_connection_setup_with_g_main(connection, NULL); - g_main_loop_run(mainloop); return 0; } |