diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 20:26:01 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 20:26:56 -0400 |
commit | 068a90a92337d8476a69ed0048723e7587f6209f (patch) | |
tree | fdf92a4fad19701d7469d827feeb4ae5b51c4fb2 /libgpsd_core.c | |
parent | 7b0feb181260ff4e005547a3ae870ebc545b1e85 (diff) | |
download | gpsd-068a90a92337d8476a69ed0048723e7587f6209f.tar.gz |
Now that the transition is done we can restore the gpsd_report name.
All regression tests pass.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 52a3aadb..7b8c6774 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -49,7 +49,7 @@ static void basic_report(const char *buf) (void)fputs(buf, stderr); } -void errout_reset(struct errout_t *errout) +void errout_reset(struct gpsd_errout_t *errout) { errout->debug = 0; errout->report = basic_report; @@ -87,7 +87,7 @@ static void visibilize(/*@out@*/char *buf2, size_t len, const char *buf) 0x00ff & (unsigned)*sp); } -void gpsd_notify(const struct errout_t *errout, +void gpsd_report(const struct gpsd_errout_t *errout, const int errlevel, const char *fmt, ...) /* assemble msg in printf(3) style, use errout hook or syslog for delivery */ @@ -166,12 +166,12 @@ const char *gpsd_prettydump(struct gps_device_t *session) } -static void gpsd_run_device_hook(struct errout_t *errout, +static void gpsd_run_device_hook(struct gpsd_errout_t *errout, char *device_name, char *hook) { struct stat statbuf; if (stat(DEVICEHOOKPATH, &statbuf) == -1) - gpsd_notify(errout, LOG_PROG, + gpsd_report(errout, LOG_PROG, "no %s present, skipped running %s hook\n", DEVICEHOOKPATH, hook); else { @@ -183,19 +183,19 @@ static void gpsd_run_device_hook(struct errout_t *errout, size_t bufsize = strlen(DEVICEHOOKPATH) + 1 + strlen(device_name) + 1 + strlen(hook) + 1; char *buf = malloc(bufsize); if (buf == NULL) - gpsd_notify(errout, LOG_ERROR, + gpsd_report(errout, LOG_ERROR, "error allocating run-hook buffer\n"); else { int status; (void)snprintf(buf, bufsize, "%s %s %s", DEVICEHOOKPATH, device_name, hook); - gpsd_notify(errout, LOG_INF, "running %s\n", buf); + gpsd_report(errout, LOG_INF, "running %s\n", buf); status = system(buf); if (status == -1) - gpsd_notify(errout, LOG_ERROR, "error running %s\n", buf); + gpsd_report(errout, LOG_ERROR, "error running %s\n", buf); else - gpsd_notify(errout, LOG_INF, + gpsd_report(errout, LOG_INF, "%s returned %d\n", DEVICEHOOKPATH, WEXITSTATUS(status)); free(buf); @@ -214,12 +214,12 @@ int gpsd_switch_driver(struct gps_device_t *session, char *type_name) if (first_sync && strcmp(session->device_type->type_name, type_name) == 0) return 0; - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "switch_driver(%s) called...\n", type_name); /*@ -compmempass @*/ for (dp = gpsd_drivers, i = 0; *dp; dp++, i++) if (strcmp((*dp)->type_name, type_name) == 0) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "selecting %s driver...\n", (*dp)->type_name); gpsd_assert_sync(session); @@ -238,7 +238,7 @@ int gpsd_switch_driver(struct gps_device_t *session, char *type_name) #endif /* RECONFIGURE_ENABLE */ return 1; } - gpsd_notify(&session->context->errout, LOG_ERROR, "invalid GPS type \"%s\".\n", type_name); + gpsd_report(&session->context->errout, LOG_ERROR, "invalid GPS type \"%s\".\n", type_name); return 0; /*@ +compmempass @*/ /*@+mustfreeonly@*/ @@ -343,7 +343,7 @@ void gpsd_deactivate(struct gps_device_t *session) session->device_type->mode_switcher(session, 0); } #endif /* RECONFIGURE_ENABLE */ - gpsd_notify(&session->context->errout, LOG_INF, "closing GPS=%s (%d)\n", + gpsd_report(&session->context->errout, LOG_INF, "closing GPS=%s (%d)\n", session->gpsdata.dev.path, session->gpsdata.gps_fd); #if defined(NMEA2000_ENABLE) if (session->sourcetype == source_can) @@ -395,7 +395,7 @@ int gpsd_open(struct gps_device_t *session) session->gpsdata.gps_fd = netgnss_uri_open(session, session->gpsdata.dev.path); session->sourcetype = source_tcp; - gpsd_notify(&session->context->errout, LOG_SPIN, + gpsd_report(&session->context->errout, LOG_SPIN, "netgnss_uri_open(%s) returns socket on fd %d\n", session->gpsdata.dev.path, session->gpsdata.gps_fd); return session->gpsdata.gps_fd; @@ -407,21 +407,21 @@ int gpsd_open(struct gps_device_t *session) INVALIDATE_SOCKET(session->gpsdata.gps_fd); port = strchr(server, ':'); if (port == NULL) { - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "Missing colon in TCP feed spec.\n"); return -1; } *port++ = '\0'; - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "opening TCP feed at %s, port %s.\n", server, port); if ((dsock = netlib_connectsock(AF_UNSPEC, server, port, "tcp")) < 0) { - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "TCP device open error %s.\n", netlib_errstr(dsock)); return -1; } else - gpsd_notify(&session->context->errout, LOG_SPIN, + gpsd_report(&session->context->errout, LOG_SPIN, "TCP device opened on fd %d\n", dsock); session->gpsdata.gps_fd = dsock; session->sourcetype = source_tcp; @@ -434,21 +434,21 @@ int gpsd_open(struct gps_device_t *session) INVALIDATE_SOCKET(session->gpsdata.gps_fd); port = strchr(server, ':'); if (port == NULL) { - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "Missing colon in UDP feed spec.\n"); return -1; } *port++ = '\0'; - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "opening UDP feed at %s, port %s.\n", server, port); if ((dsock = netlib_connectsock(AF_UNSPEC, server, port, "udp")) < 0) { - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "UDP device open error %s.\n", netlib_errstr(dsock)); return -1; } else - gpsd_notify(&session->context->errout, LOG_SPIN, + gpsd_report(&session->context->errout, LOG_SPIN, "UDP device opened on fd %d\n", dsock); session->gpsdata.gps_fd = dsock; session->sourcetype = source_udp; @@ -466,16 +466,16 @@ int gpsd_open(struct gps_device_t *session) port = DEFAULT_GPSD_PORT; } else *port++ = '\0'; - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "opening remote gpsd feed at %s, port %s.\n", server, port); if ((dsock = netlib_connectsock(AF_UNSPEC, server, port, "tcp")) < 0) { - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "remote gpsd device open error %s.\n", netlib_errstr(dsock)); return -1; } else - gpsd_notify(&session->context->errout, LOG_SPIN, + gpsd_report(&session->context->errout, LOG_SPIN, "remote gpsd feed opened on fd %d\n", dsock); /*@+branchstate +nullpass@*/ /* watch to remote is issued when WATCH is */ @@ -517,32 +517,32 @@ int gpsd_activate(struct gps_device_t *session, const int mode) /*@ -mustfreeonly @*/ for (dp = gpsd_drivers; *dp; dp++) { if ((*dp)->probe_detect != NULL) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "Probing \"%s\" driver...\n", (*dp)->type_name); /* toss stale data */ (void)tcflush(session->gpsdata.gps_fd, TCIOFLUSH); if ((*dp)->probe_detect(session) != 0) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "Probe found \"%s\" driver...\n", (*dp)->type_name); session->device_type = *dp; gpsd_assert_sync(session); goto foundit; } else - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "Probe not found \"%s\" driver...\n", (*dp)->type_name); } } /*@ +mustfreeonly @*/ - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "no probe matched...\n"); } foundit: #endif /* NON_NMEA_ENABLE */ gpsd_clear(session); - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "gpsd_activate(%d): activated GPS (fd %d)\n", session->mode, session->gpsdata.gps_fd); /* @@ -741,7 +741,7 @@ static bool invert(double mat[4][4], /*@out@*/ double inverse[4][4]) /*@ +fixedformalarray +mustdefine @*/ -static gps_mask_t fill_dop(const struct errout_t *errout, +static gps_mask_t fill_dop(const struct gpsd_errout_t *errout, const struct gps_data_t * gpsdata, struct dop_t * dop) { @@ -768,7 +768,7 @@ static gps_mask_t fill_dop(const struct errout_t *errout, /* If we don't have 4 satellites then we don't have enough information to calculate DOPS */ if (n < 4) { #ifdef __UNUSED__ - gpsd_notify(errout, LOG_DATA + 2, + gpsd_report(errout, LOG_DATA + 2, "Not enough satellites available %d < 4:\n", n); #endif /* __UNUSED__ */ @@ -779,9 +779,9 @@ static gps_mask_t fill_dop(const struct errout_t *errout, memset(inv, 0, sizeof(inv)); #ifdef __UNUSED__ - gpsd_notify(errout, LOG_INF, "Line-of-sight matrix:\n"); + gpsd_report(errout, LOG_INF, "Line-of-sight matrix:\n"); for (k = 0; k < n; k++) { - gpsd_notify(errout, LOG_INF, "%f %f %f %f\n", + gpsd_report(errout, LOG_INF, "%f %f %f %f\n", satpos[k][0], satpos[k][1], satpos[k][2], satpos[k][3]); } #endif /* __UNUSED__ */ @@ -796,9 +796,9 @@ static gps_mask_t fill_dop(const struct errout_t *errout, } #ifdef __UNUSED__ - gpsd_notify(errout, LOG_INF, "product:\n"); + gpsd_report(errout, LOG_INF, "product:\n"); for (k = 0; k < 4; k++) { - gpsd_notify(errout, LOG_INF, "%f %f %f %f\n", + gpsd_report(errout, LOG_INF, "%f %f %f %f\n", prod[k][0], prod[k][1], prod[k][2], prod[k][3]); } #endif /* __UNUSED__ */ @@ -809,16 +809,16 @@ static gps_mask_t fill_dop(const struct errout_t *errout, * Note: this will print garbage unless all the subdeterminants * are computed in the invert() function. */ - gpsd_notify(errout, LOG_RAW, "inverse:\n"); + gpsd_report(errout, LOG_RAW, "inverse:\n"); for (k = 0; k < 4; k++) { - gpsd_notify(errout, LOG_RAW, + gpsd_report(errout, LOG_RAW, "%f %f %f %f\n", inv[k][0], inv[k][1], inv[k][2], inv[k][3]); } #endif /* __UNUSED__ */ } else { #ifndef USE_QT - gpsd_notify(errout, LOG_DATA, + gpsd_report(errout, LOG_DATA, "LOS matrix is singular, can't calculate DOPs - source '%s'\n", gpsdata->dev.path); #endif @@ -834,7 +834,7 @@ static gps_mask_t fill_dop(const struct errout_t *errout, gdop = sqrt(inv[0][0] + inv[1][1] + inv[2][2] + inv[3][3]); #ifndef USE_QT - gpsd_notify(errout, LOG_DATA, + gpsd_report(errout, LOG_DATA, "DOPS computed/reported: X=%f/%f, Y=%f/%f, H=%f/%f, V=%f/%f, P=%f/%f, T=%f/%f, G=%f/%f\n", xdop, dop->xdop, ydop, dop->ydop, hdop, dop->hdop, vdop, dop->vdop, pdop, dop->pdop, tdop, dop->tdop, gdop, dop->gdop); @@ -1026,7 +1026,7 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, /*@out@*/fd_set *efds, const int maxfd, /*@in@*/fd_set *all_fds, - struct errout_t *errout) + struct gpsd_errout_t *errout) /* await data from any socket in the all_fds set */ { int status; @@ -1036,7 +1036,7 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, FD_ZERO(efds); (void)memcpy((char *)rfds, (char *)all_fds, sizeof(fd_set)); - gpsd_notify(errout, LOG_RAW + 2, "select waits\n"); + gpsd_report(errout, LOG_RAW + 2, "select waits\n"); /* * Poll for user commands or GPS data. The timeout doesn't * actually matter here since select returns whenever one of @@ -1075,7 +1075,7 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, } return AWAIT_NOT_READY; } else { - gpsd_notify(errout, LOG_ERROR, "select: %s\n", strerror(errno)); + gpsd_report(errout, LOG_ERROR, "select: %s\n", strerror(errno)); return AWAIT_FAILED; } } @@ -1096,7 +1096,7 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, if (FD_ISSET(i, rfds)) (void)snprintf(dbuf + strlen(dbuf), sizeof(dbuf) - strlen(dbuf), " %d ", i); - gpsd_notify(errout, LOG_SPIN, + gpsd_report(errout, LOG_SPIN, "select() {%s} at %f (errno %d)\n", dbuf, timestamp(), errno); } @@ -1201,10 +1201,10 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) double gap = now - session->lexer.start_time; if (gap > min_cycle) - gpsd_notify(&session->context->errout, LOG_WARN, + gpsd_report(&session->context->errout, LOG_WARN, "cycle-start detector failed.\n"); else if (gap > quiet_time) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "transmission pause of %f\n", gap); session->sor = now; session->lexer.start_char = session->lexer.char_counter; @@ -1224,7 +1224,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) if (session->device_type != NULL) { newlen = session->device_type->get_packet(session); /* coverity[deref_ptr] */ - gpsd_notify(&session->context->errout, LOG_RAW, + gpsd_report(&session->context->errout, LOG_RAW, "%s is known to be %s\n", session->gpsdata.dev.path, session->device_type->type_name); @@ -1233,11 +1233,11 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) } /* update the scoreboard structure from the GPS */ - gpsd_notify(&session->context->errout, LOG_RAW + 2, + gpsd_report(&session->context->errout, LOG_RAW + 2, "%s sent %zd new characters\n", session->gpsdata.dev.path, newlen); if (newlen < 0) { /* read error */ - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "GPS on %s returned error %zd (%lf sec since data)\n", session->gpsdata.dev.path, newlen, timestamp() - session->gpsdata.online); @@ -1249,7 +1249,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) * wrong time... */ if (session->gpsdata.online > 0 && timestamp() - session->gpsdata.online >= session->gpsdata.dev.cycle * 2) { - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "GPS on %s is offline (%lf sec since data)\n", session->gpsdata.dev.path, timestamp() - session->gpsdata.online); @@ -1257,17 +1257,17 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) } return NODATA_IS; } else /* (newlen > 0) */ { - gpsd_notify(&session->context->errout, LOG_RAW, + gpsd_report(&session->context->errout, LOG_RAW, "packet sniff on %s finds type %d\n", session->gpsdata.dev.path, session->lexer.type); if (session->lexer.type == COMMENT_PACKET) { if (strcmp((const char *)session->lexer.outbuffer, "# EOF\n") == 0) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "synthetic EOF\n"); return EOF_SET; } else - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "comment, sync lock deferred\n"); /* FALL THROUGH */ } else if (session->lexer.type > COMMENT_PACKET) { @@ -1308,7 +1308,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) for (dp = gpsd_drivers; *dp; dp++) if (session->lexer.type == (*dp)->packet_type) { - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "switching to match packet type %d: %s\n", session->lexer.type, gpsd_prettydump(session)); (void)gpsd_switch_driver(session, (*dp)->type_name); @@ -1320,7 +1320,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) session->gpsdata.dev.driver_mode = (session->lexer.type > NMEA_PACKET) ? MODE_BINARY : MODE_NMEA; /* FALL THROUGH */ } else if (hunt_failure(session) && !gpsd_next_hunt_setting(session)) { - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "hunt on %s failed (%lf sec since data)\n", session->gpsdata.dev.path, timestamp() - session->gpsdata.online); @@ -1329,7 +1329,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) } if (session->lexer.outbuflen == 0) { /* got new data, but no packet */ - gpsd_notify(&session->context->errout, LOG_RAW + 3, + gpsd_report(&session->context->errout, LOG_RAW + 3, "New data on %s, not yet a packet\n", session->gpsdata.dev.path); return ONLINE_SET; @@ -1337,7 +1337,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) gps_mask_t received = PACKET_SET; session->gpsdata.online = timestamp(); - gpsd_notify(&session->context->errout, LOG_RAW + 3, + gpsd_report(&session->context->errout, LOG_RAW + 3, "Accepted packet on %s.\n", session->gpsdata.dev.path); @@ -1348,7 +1348,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) /*@-nullderef@*/ /* coverity[var_deref_op] */ - gpsd_notify(&session->context->errout, LOG_INF, + gpsd_report(&session->context->errout, LOG_INF, "%s identified as type %s, %f sec @ %ubps\n", session->gpsdata.dev.path, session->device_type->type_name, @@ -1394,7 +1394,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) * level does not actually require it. */ if (session->context->errout.debug >= LOG_RAW) - gpsd_notify(&session->context->errout, LOG_RAW, + gpsd_report(&session->context->errout, LOG_RAW, "raw packet of type %d, %zd:%s\n", session->lexer.type, session->lexer.outbuflen, @@ -1419,7 +1419,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) && session->last_controller != NULL) { session->device_type = session->last_controller; - gpsd_notify(&session->context->errout, LOG_PROG, + gpsd_report(&session->context->errout, LOG_PROG, "reverted to %s driver...\n", session->device_type->type_name); } @@ -1458,7 +1458,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) /* don't downgrade mode if holding previous fix */ if (session->gpsdata.fix.mode > session->newdata.mode) session->gpsdata.set &= ~MODE_SET; - //gpsd_notify(&session->context->errout, LOG_PROG, + //gpsd_report(&session->context->errout, LOG_PROG, // "transfer mask: %02x\n", session->gpsdata.set); gps_merge_fix(&session->gpsdata.fix, session->gpsdata.set, &session->newdata); @@ -1497,10 +1497,10 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) /*@+relaxtypes +longunsignedintegral@*/ if ((session->gpsdata.set & TIME_SET) != 0) { if (session->newdata.time > time(NULL) + (60 * 60 * 24 * 365)) - gpsd_notify(&session->context->errout, LOG_WARN, + gpsd_report(&session->context->errout, LOG_WARN, "date more than a year in the future!\n"); else if (session->newdata.time < 0) - gpsd_notify(&session->context->errout, LOG_ERROR, + gpsd_report(&session->context->errout, LOG_ERROR, "date is negative!\n"); } /*@-relaxtypes -longunsignedintegral@*/ @@ -1519,7 +1519,7 @@ int gpsd_multipoll(const bool data_ready, { int fragments; - gpsd_notify(&device->context->errout, LOG_RAW + 1, + gpsd_report(&device->context->errout, LOG_RAW + 1, "polling %d\n", device->gpsdata.gps_fd); #ifdef NETFEED_ENABLE @@ -1532,7 +1532,7 @@ int gpsd_multipoll(const bool data_ready, (void)ntrip_open(device, ""); if (device->ntrip.conn_state == ntrip_conn_err) { - gpsd_notify(&device->context->errout, LOG_WARN, + gpsd_report(&device->context->errout, LOG_WARN, "connection to ntrip server failed\n"); device->ntrip.conn_state = ntrip_conn_init; return DEVICE_ERROR; @@ -1546,12 +1546,12 @@ int gpsd_multipoll(const bool data_ready, gps_mask_t changed = gpsd_poll(device); if (changed == EOF_SET) { - gpsd_notify(&device->context->errout, LOG_WARN, + gpsd_report(&device->context->errout, LOG_WARN, "device signed off %s\n", device->gpsdata.dev.path); return DEVICE_EOF; } else if (changed == ERROR_SET) { - gpsd_notify(&device->context->errout, LOG_WARN, + gpsd_report(&device->context->errout, LOG_WARN, "device read of %s returned error or packet sniffer failed sync (flags %s)\n", device->gpsdata.dev.path, gps_maskdump(changed)); @@ -1562,7 +1562,7 @@ int gpsd_multipoll(const bool data_ready, * fd may have been in an end-of-file condition on select. */ if (fragments == 0) { - gpsd_notify(&device->context->errout, LOG_DATA, + gpsd_report(&device->context->errout, LOG_DATA, "%s returned zero bytes\n", device->gpsdata.dev.path); if (device->zerokill) { @@ -1571,11 +1571,11 @@ int gpsd_multipoll(const bool data_ready, if (device->ntrip.works) { device->ntrip.works = false; // reset so we try this once only if (gpsd_activate(device, O_CONTINUE) < 0) { - gpsd_notify(&device->context->errout, LOG_WARN, + gpsd_report(&device->context->errout, LOG_WARN, "reconnect to ntrip server failed\n"); return DEVICE_ERROR; } else { - gpsd_notify(&device->context->errout, LOG_INFO, + gpsd_report(&device->context->errout, LOG_INFO, "reconnecting to ntrip server\n"); return DEVICE_READY; } @@ -1587,7 +1587,7 @@ int gpsd_multipoll(const bool data_ready, * Disable listening to this fd for long enough * that the buffer can fill up again. */ - gpsd_notify(&device->context->errout, LOG_DATA, + gpsd_report(&device->context->errout, LOG_DATA, "%s will be repolled in %f seconds\n", device->gpsdata.dev.path, reawake_time); device->reawake = timestamp() + reawake_time; @@ -1614,11 +1614,11 @@ int gpsd_multipoll(const bool data_ready, /* conditional prevents mask dumper from eating CPU */ if (device->context->errout.debug >= LOG_DATA) { if (device->lexer.type == BAD_PACKET) - gpsd_notify(&device->context->errout, LOG_DATA, + gpsd_report(&device->context->errout, LOG_DATA, "packet with bad checksum from %s\n", device->gpsdata.dev.path); else - gpsd_notify(&device->context->errout, LOG_DATA, + gpsd_report(&device->context->errout, LOG_DATA, "packet type %d from %s with %s\n", device->lexer.type, device->gpsdata.dev.path, @@ -1647,7 +1647,7 @@ int gpsd_multipoll(const bool data_ready, } else if (device->reawake>0 && timestamp()>device->reawake) { /* device may have had a zero-length read */ - gpsd_notify(&device->context->errout, LOG_DATA, + gpsd_report(&device->context->errout, LOG_DATA, "%s reawakened after zero-length read\n", device->gpsdata.dev.path); device->reawake = (timestamp_t)0; |