summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-11-04 22:40:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-11-04 22:40:41 +0000
commit6a129c1c630e7671df4e9a7dbebddc84bda6158e (patch)
treec66bbca47f3946d2b594c5682dba98aded75fc6a /libgpsd_core.c
parente7199f9c077656eb77eec1a4ed735587aafdf534 (diff)
downloadgpsd-6a129c1c630e7671df4e9a7dbebddc84bda6158e.tar.gz
Grrr..fire the event_identified hook and fix a broken conditional.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index e1263f46..76af261a 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -530,9 +530,12 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
#endif /* TIMING_ENABLE */
/* track the packet count since achieving sync on the device */
- if (first_sync)
+ if (first_sync) {
+ /* fire the identified hook */
+ if (session->device_type->event_hook != NULL)
+ session->device_type->event_hook(session, event_configure);
session->packet.counter = 0;
- else
+ } else
session->packet.counter++;
/* fire the configure hook */