summaryrefslogtreecommitdiff
path: root/driver_proto.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-07-11 12:32:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-07-11 12:32:41 +0000
commitb89766bedaa4143db4aa54496cc3ad459fc6996c (patch)
tree91e00b70309fab5542bd51d35a361e209f286702 /driver_proto.c
parentd56e47611cb5d2966bd7eb923dcb51bd8c66fcd0 (diff)
downloadgpsd-b89766bedaa4143db4aa54496cc3ad459fc6996c.tar.gz
Architecture extension; handle variable sample rates.
Diffstat (limited to 'driver_proto.c')
-rw-r--r--driver_proto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_proto.c b/driver_proto.c
index a00b50e5..482606d8 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -32,7 +32,7 @@ static bool proto_write(int fd, unsigned char *msg, size_t msglen) {
for (i = 0; i < msglen; i++)
(void)snprintf((char*)buf+strlen((char *)buf),sizeof((char*)buf)-strlen((char*)buf),
" %02x", msg[i]);
- len = (size_t)strlen(buf);
+ len = (size_t)strlen((char *)buf);
gpsd_report(4, "writing proto control type %02x:%s\n", msg[0], buf);
ok = (write(fd, buf, len) == (ssize_t)len);
(void)tcdrain(fd);
@@ -141,6 +141,8 @@ struct gps_type_t proto_binary =
pass_rtcm, /* send RTCM data straight */
proto_speed, /* we can change baud rates */
proto_mode, /* there is a mode switcher */
+ NULL, /* no rate switcher */
+ -1, /* not relevant, no rate switcher,
NULL, /* caller needs to supply a close hook */
1, /* updates every second */
};