summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-26 14:15:52 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-26 14:16:37 -0400
commitf69edaae7bbb22601e8b213a342ebd3ba4df780a (patch)
treef18329843847262d2467c52a764c665c1e6cba2b /gpsmon.c
parentfcf435a2c28f855f91bc08a6dcab72d0b12bfb67 (diff)
downloadgpsd-f69edaae7bbb22601e8b213a342ebd3ba4df780a.tar.gz
Eliminate reverse linkage of gpsd_write. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 37d6b1aa..cfcaa8e2 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -639,7 +639,7 @@ void gpsd_report(const int debuglevel, const int errlevel, const char *fmt, ...)
}
}
-ssize_t gpsd_write(struct gps_device_t *session,
+static ssize_t gpsmon_serial_write(struct gps_device_t *session,
const char *buf,
const size_t len)
/* pass low-level data to devices, echoing it to the log window */
@@ -1099,6 +1099,7 @@ int main(int argc, char **argv)
(void)putenv("TZ=UTC"); // for ctime()
/*@ +observertrans @*/
gps_context_init(&context); // initialize the report mutex
+ context.serial_write = gpsmon_serial_write;
while ((option = getopt(argc, argv, "aD:LVhl:nt:?")) != -1) {
switch (option) {
case 'a':