summaryrefslogtreecommitdiff
path: root/gpsmon.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up pps_early_init() placement in gpsmon.Gary E. Miller2015-02-021-3/+3
|
* Fix improper typecasting in a timespecGary E. Miller2015-02-021-6/+6
|
* Add TS_SUB() to subtract timespecs. Fix another double.Gary E. Miller2015-02-021-5/+7
|
* Comment possible numeric overflow in timespec_diff_ns()Gary E. Miller2015-02-021-0/+1
| | | | | timespec_diff_ns() should not be used is the delta is more than about 2 seconds.
* Add missing ppslast_mutex init to gpsmonGary E. Miller2015-02-021-0/+3
| | | | This will prevent random pthread crashes.
* Tighter guard on buf variable in gpsmon.c to match usageJon Schlueter2015-01-261-0/+2
| | | | -Wunused-variable warning hunting cleanup
* Coverity/splint cleanup.Eric S. Raymond2015-01-211-1/+2
| | | | | Turned up a bug in where a counter was incremented un the Navcom driver; this required one test rebuild.
* Add str_{,v}appendf, use it everywhere.Zbigniew Chyla2015-01-211-4/+2
| | | | This change doesn't affect generated binary code.
* Add str_starts_with macro, use it instead of strncmp.Zbigniew Chyla2015-01-211-3/+4
| | | | This change doesn't affect generated binary code.
* Always use sizeof to get array sizeZbigniew Chyla2015-01-131-1/+1
| | | | | | Don't use constant/expression from an array's definition when referring to its size. Eliminates redundancy and avoids problems when array size changes. The change doesn't affect generated code.
* Cleanup of string function and sizeof usage. All regression tests pass.Zbigniew Chyla2015-01-131-2/+2
|
* Fix the build in some unusual cases. All regression tests pass.Eric S. Raymond2015-01-131-2/+2
|
* warning hunting cleanup -Wunused-variable in gpsmon.cJon Schlueter2015-01-091-1/+3
| | | | | Mismatch for 2 functions relating to CONTROLSEND_ENABLE and RECONFIGURE_ENABLE and PPS_ENABLE not being defined
* Fix a brown-paper-bag typo.Eric S. Raymond2015-01-091-1/+1
|
* In gpsmon, prevent a spurious warning on Bluetooth devices.Eric S. Raymond2015-01-081-2/+5
|
* Silences an unused-variable warning when ntpshm = FalseMatt2015-01-081-0/+2
|
* Move side effects out of assert()Zbigniew Chyla2015-01-071-2/+3
|
* Silence compiler warnings about array subscripts of type 'char'Matt2014-09-101-5/+5
| | | | | | | | | | | | | | | | | | | | Cygwin GCC complains about code like isprint(c), where c is of type char. The isX() and toX() functions/macros (ISO C allows either) all accept an int, whose value should be either that of an unsigned char, or the special value EOF (== -1). So cast to unsigned char each argument to isprint, tolower, etc. Silences several warnings of the form: gpsutils.c: In function 'safe_atof': gpsutils.c:90:5: warning: array subscript has type 'char' [-Wchar-subscripts] while (isspace(*p)) { ^ gpsutils.c:188:2: warning: array subscript has type 'char' [-Wchar-subscripts] while (isdigit(*p)) { ^
* Complete wrapping of ntpshm_latch function in #ifdef NTPSHM_ENABLESimon Dawson2014-09-041-0/+2
| | | | | | | | | | | | | Currently, the build fails as follows gpsmon.o: In function `gpsmon_hook': gpsmon.c:(.text+0x8b0): undefined reference to `ntpshm_latch' collect2: error: ld returned 1 exit status scons: *** [gpsmon] Error 1 Addresses Sacannah bug #43129: ntpshm patch is incomplete. Signed-off-by: Simon Dawson <spdawson@gmail.com>
* splint/cppcheck cleanuo after the gpsd_report change.Eric S. Raymond2014-08-271-5/+4
| | | | All regression tests pass.
* Clean up duplicarive code in gpsmon.Eric S. Raymond2014-08-271-12/+1
|
* Reverse linkage of gpsd_report() is abolished. All regression tests pass.Eric S. Raymond2014-08-271-51/+20
| | | | Some cleanup and testing is still required.
* More gpsd_report removal. All regression tests pass.Eric S. Raymond2014-08-271-1/+1
|
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-2/+2
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-15/+15
| | | | All regression tests pass.
* Eliminate reverse linkage of gpsd_write. All regression tests pass.Eric S. Raymond2014-08-261-1/+2
|
* splint cleanup. All regression tests pass.Eric S. Raymond2014-08-251-0/+2
|
* Attempted fix for second 'n' not working in gpsmon.Eric S. Raymond2014-08-241-0/+7
|
* Fix trivial but fatal errors introduced by last commit.Eric S. Raymond2014-08-241-2/+1
| | | | All regtession tests pass. gpsmon works live on GR601-W (with PPS).
* Properly free devices when select() sees bad fds for them.Eric S. Raymond2014-08-241-4/+0
|
* Clean up some FIXMEs. All regression tests pass.Eric S. Raymond2014-08-241-1/+1
|
* Re-integrate Miroslav's support for large PPS offsets.Eric S. Raymond2014-08-221-1/+2
| | | | | | The factoring on this could use some cleanup. All regression tests pass. PPS is live in both gpsd and gpsmon.
* Restore PPS function by backing out Miroslav Lichtvar's last commit.Eric S. Raymond2014-08-211-1/+1
| | | | | | | | It came in way, way out of sequence ansd screwed something up. He may have been fixing some real problem, however. This requures investigation. All regression tests pass.
* splint/cppcheck/coverity cleanup.Eric S. Raymond2014-08-211-0/+2
|
* Fix up argument parsing in gpsmon.Eric S. Raymond2014-08-201-16/+35
| | | | | | Addresses a minor bug report by Michael Tatarinov <kukabu@gmail.com>. Adds the capability, in daemon mode, to watch a specified device rather than all devices.
* Include <sys/select.h> everywhere fd_set us used.Eric S. Raymond2014-08-181-0/+1
| | | | | | | | This came up in connection with Android. According to SuS this shouln't be necessary if sys/time.h was included, but oh well. While we;re at it, rearrange some includes for more consistent order. All regression tests pass.
* Attempt to recover from EBADF in the main select.Eric S. Raymond2014-08-181-0/+8
| | | | All regression tests pass.
* Fix PPS with large offsets.Miroslav Lichvar2014-08-171-1/+1
| | | | | | | | | | | | | | This was broken by commit 575444. The check if the PPS time isn't referenced with an old message time used PPS offset instead of the difference between local PPS time and local time of the last message. The PPS sample was reported via SHM or chrony socket only if the offset was between -1 and 1000001 seconds. Keep the local timestamp of the last fix in struct gps_device_t in addition to the real timestamp and use it to check the PPS delay. Rename the l_offset variable to delay to avoid further confusion. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* gpsmon: fix build when nmea is falseSimon Dawson2014-01-031-0/+4
| | | | | | | | | | | | | | | | | When nmea is False and ncurses support is enabled, the build fails as follows. gpsmon.o: In function `gpsmon_hook': gpsmon.c:(.text+0x974): undefined reference to `driver_nmea0183' collect2: error: ld returned 1 exit status scons: *** [gpsmon] Error 1 scons: building terminated because of errors. The problem appears to be a failure to protect use of the driver_nmea0183 variable with appropriate #ifdef guards. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* gpsmon: fix build when reconfigure is falseSimon Dawson2014-01-031-0/+4
| | | | | | | | | | | | | | | | | | | When reconfigure is False and ncurses support is enabled, the build fails as follows. gpsmon.o: In function `gpsd_write': gpsmon.c:(.text+0xbbc): undefined reference to `monitor_dump_send' gpsmon.o: In function `main': gpsmon.c:(.text.startup+0xd68): undefined reference to `announce_log' collect2: error: ld returned 1 exit status scons: *** [gpsmon] Error 1 scons: building terminated because of errors. The problem appears to be a failure to protect calls to momnitor_dump_send and announce_log with appropriate #ifdef guards. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Investigating ways to get rid of CLOSE_DELAY in the test framework...Eric S. Raymond2013-11-271-0/+3
| | | | | | | | ...actually revealed a bug - device-shutdown messages getting lost on the way out to the test clients. This set of changes mostly fixes it. Some glitches remain; this state of things passes all regression tests but attempting to get rid of what now ought to be unnecessary code in fake.py does not pass. To be continued...
* Add a licensing answer to the FAQ.Eric S. Raymond2013-11-251-6/+14
|
* Code is now static-checker clean with splint, cppcheck, and Coverity.Eric S. Raymond2013-11-191-2/+2
| | | | All regression tests pass. PPS is live.
* Upgun the gpsmon prompt for Hal Murray's benefit.Eric S. Raymond2013-11-191-10/+25
|
* Trivial fix for Hal Murray's 8N1N1 artifact.Eric S. Raymond2013-11-191-1/+1
|
* Add timeout on wait-for-ACK to SiRF driver.Eric S. Raymond2013-11-191-1/+7
| | | | Correct initialization observed oon SiRF-III. All regression tests pass.
* Coverity annotations.Eric S. Raymond2013-11-181-1/+2
|
* spint annotation fixes. No logic changes.Eric S. Raymond2013-11-181-20/+29
| | | | All regression tests pass, PPS is live.
* Be explicit when PPS is not available because the build used pps=no.Eric S. Raymond2013-11-171-1/+3
|
* PPS offset field now updates properly in gpsmon client mode.Eric S. Raymond2013-11-171-1/+12
|