summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-27 17:40:48 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-27 17:40:48 -0400
commitd77d96c6d6150ffe24f1d57fd021d18f0c20901b (patch)
tree3f2c30d539431d552e9c9132c29f5304ad413420 /drivers.c
parent0a113e2f39e179e84b03e1da1947f401966d981e (diff)
downloadgpsd-d77d96c6d6150ffe24f1d57fd021d18f0c20901b.tar.gz
All gpsd_reportcalls are gone. Only the unused definitins are left.
Next, implement labeled reporting and fix up gpson to do the right thing. All regression tests pass.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers.c b/drivers.c
index d1e869bb..79f8d1a4 100644
--- a/drivers.c
+++ b/drivers.c
@@ -795,7 +795,8 @@ const struct gps_type_t driver_trueNorth = {
*
**************************************************************************/
-static int oceanserver_send(const int debug, const int fd, const char *fmt, ...)
+static int oceanserver_send(struct errout_t *errout,
+ const int fd, const char *fmt, ...)
{
int status;
char buf[BUFSIZ];
@@ -808,10 +809,10 @@ static int oceanserver_send(const int debug, const int fd, const char *fmt, ...)
status = (int)write(fd, buf, strlen(buf));
(void)tcdrain(fd);
if (status == (int)strlen(buf)) {
- gpsd_report(debug, LOG_IO, "=> GPS: %s\n", buf);
+ gpsd_notify(errout, LOG_IO, "=> GPS: %s\n", buf);
return status;
} else {
- gpsd_report(debug, LOG_WARN, "=> GPS: %s FAILED\n", buf);
+ gpsd_notify(errout, LOG_WARN, "=> GPS: %s FAILED\n", buf);
return -1;
}
}
@@ -823,10 +824,10 @@ static void oceanserver_event_hook(struct gps_device_t *session,
return;
if (event == event_configure && session->lexer.counter == 0) {
/* report in NMEA format */
- (void)oceanserver_send(session->context->errout.debug,
+ (void)oceanserver_send(&session->context->errout,
session->gpsdata.gps_fd, "2\n");
/* ship all fields */
- (void)oceanserver_send(session->context->errout.debug,
+ (void)oceanserver_send(&session->context->errout,
session->gpsdata.gps_fd, "X2047");
}
}
@@ -1344,7 +1345,7 @@ static bool aivdm_decode(const char *buf, size_t buflen,
ais_context->decoded_frags = 0;
/* decode the assembled binary packet */
- return ais_binary_decode(session->context->errout.debug,
+ return ais_binary_decode(&session->context->errout,
ais,
ais_context->bits,
ais_context->bitlen,