summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-10-30 11:02:16 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-10-30 11:02:16 +0000
commitf6519ca132b92c29874b40079ca1f5d07ecd0676 (patch)
tree011cc2685be175c35f7664bacb35e2d44f9faaaa /serial.c
parenta94d50c111df0d6ac9947e12980eddd9a116fde4 (diff)
downloadgpsd-f6519ca132b92c29874b40079ca1f5d07ecd0676.tar.gz
Split the "initializer" driver method in two.
There is now a new method, "configurator". The initializer method probes the driver for subtype information (such as a firmware rev) without changing any device settings. The configurator method does things like selecting which packets should send. At the moment, these two methods are always called in tandem, so there has been effectively no change in behavior. Soon, though, gpsctrl will call the initializer method but *not* the configurator.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/serial.c b/serial.c
index 4d6b0eb6..b92810fc 100644
--- a/serial.c
+++ b/serial.c
@@ -208,6 +208,10 @@ int gpsd_open(struct gps_device_t *session)
/*@i1@*/session->device_type = *dp;
if (session->device_type->initializer)
session->device_type->initializer(session);
+#ifdef ALLOW_RECONFIGURE
+ if (session->device_type->configurator)
+ session->device_type->configurator(session);
+#endif /* ALLOW_RECONFIGURE */
/*@i1@*/return session->gpsdata.gps_fd;
}
}