summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-06-08 14:17:15 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-06-08 14:17:15 -0400
commitb7336b07a2b2e554d950c999b9e64b2823d07139 (patch)
tree8ef53c0fce5c1f0a2f3a382b784eac63a30db98d /gpsctl.c
parent423df1ff3a2201c5b0e9d90359464b2c9fa11575 (diff)
downloadgpsd-b7336b07a2b2e554d950c999b9e64b2823d07139.tar.gz
Introduce the gps_read() entry point and use it internally.
This is as per the roadmap. Clients can still use gps_poll(). All regression tests pass. Clients run correectly live.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 1a6db974..f45baab1 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -81,7 +81,7 @@ static int gps_query(struct gps_data_t *gpsdata, const char *fmt, ... )
return -1;
}
gpsd_report(LOG_PROG, "gps_query(), wrote, %s\n", buf);
- ret = gps_poll(gpsdata);
+ ret = gps_read(gpsdata);
if (ERROR_IS & gpsdata->set) {
gpsd_report(LOG_ERROR, "gps_query() error '%s'\n", gpsdata->error);
}
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
if (!lowlevel) {
/* OK, there's a daemon instance running. Do things the easy way */
struct devconfig_t *devlistp;
- (void)gps_poll(&gpsdata);
+ (void)gps_read(&gpsdata);
if ((gpsdata.set & DEVICELIST_SET) != 0) {
gpsd_report(LOG_ERROR, "no VERSION response received; update your gpsd.\n");
(void)gps_close(&gpsdata);