summaryrefslogtreecommitdiff
path: root/gpsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-19/+19
| | | | All regression tests pass.
* Fix for previous weird bug.Eric S. Raymond2014-08-271-3/+1
| | | | | | | free_device is OK, but it's not safe to do FD_SET() checks on file descriptors in unallocated devices. All regressioon tests pass.
* Temporarily revert code for freeing devices on bad fd in select.Eric S. Raymond2014-08-271-0/+2
| | | | | | | | | This began producing buffer overflows out of the blue in the regression tests. More weirdly, it was retroactive - revisions after my commit of 2014-08-24T11:27:11 that introduced this change started failing in the same way, even though they had passed regressions before. This may reveal an underlying bug in free_device() that is phase-of-moon dependent - to be investigated.
* Eliminate reverse linkage of gpsd_write. All regression tests pass.Eric S. Raymond2014-08-261-8/+0
|
* Properly free devices when select() sees bad fds for them.Eric S. Raymond2014-08-241-5/+1
|
* PPS is no kinger marked unstable/experimental.Eric S. Raymond2014-08-231-6/+5
|
* Static-analyzer cleanup: splint, cppcheck, coverity all clear.Eric S. Raymond2014-08-221-1/+1
| | | | All regression tests pass.
* Re-integrate Miroslav's support for large PPS offsets.Eric S. Raymond2014-08-221-24/+2
| | | | | | The factoring on this could use some cleanup. All regression tests pass. PPS is live in both gpsd and gpsmon.
* Minor documentation updates.Eric S. Raymond2014-08-221-2/+5
|
* Restore PPS function by backing out Miroslav Lichtvar's last commit.Eric S. Raymond2014-08-211-5/+2
| | | | | | | | 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.
* Fix for a warning seen on mips with -Wclobbered.Eric S. Raymond2014-08-211-1/+1
|
* splint/cppcheck/coverity cleanup.Eric S. Raymond2014-08-211-2/+8
|
* Attempt to recover from EBADF in the main select.Eric S. Raymond2014-08-181-0/+10
| | | | All regression tests pass.
* Fix PPS with large offsets.Miroslav Lichvar2014-08-171-2/+3
| | | | | | | | | | | | | | 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>
* IPV6_TCLASS is 61 on Hurd, not 67.Bernd Zeimetz2014-05-241-1/+1
| | | | | | | GNU/Hurd is not following Linux' numbers, but BSD's numbers. In this case, IPV6_TCLASS is 61 there, not 67. See Debian Bug #738646
* Revert "Work around a Hurd problem revealed by test building."Eric S. Raymond2014-05-221-2/+0
| | | | bzed had a better fix for this in place.
* Work around a Hurd problem revealed by test building.Eric S. Raymond2014-05-221-0/+2
|
* Accesses to subscriber_t->fd should be synchronizedWolfgang Ocker2014-05-171-2/+24
| | | | | | | Otherwise, FD_ISSET(sub->fd, ...) might crash since sub->fd might have set to -1 in detach_client() called by ppsthread or main loop Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
* Make gpsd build on hurd again.Bernd Zeimetz2014-01-271-0/+8
| | | | IPV6_TCLASS is not defined in socket.h on hurd.
* gpsd: rip out ECN markingDave Taht2014-01-041-1/+1
| | | | | | | As this code only gets called for tcp apparently, trying to enable ECN here is futile. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* gpsd: add TOS and ECN supportDave Taht2014-01-041-1/+16
| | | | | | | | | | | This attempts to enable marking gpsd packets to use a lowdelay TOS marking in the packet headers. It also enables the ECN bit, to lower dropping probability for systems that respect ECN. It doesn't actually DO anything with the ECN bit as at a rate of 1 per second, there isn't any rate reduction to be had. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Fix problem with devices query to control socketSimon Dawson2014-01-031-1/+1
| | | | | | | | The control socket should support a "?devices" string sent to the control socket. Unfortunately, this appears to be broken; so fix it. 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/+1
| | | | | | | | ...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...
* splint fixups - no logic changes.Eric S. Raymond2013-11-241-0/+2
|
* Don't keep cap_sys_time capability.Miroslav Lichvar2013-11-221-27/+0
| | | | | | | It's not necessary to keep the capability since time_pps_setparams is called before root privileges are dropped. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Drop also supplementary groups when dropping privileges.Miroslav Lichvar2013-11-221-0/+4
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Guarantee that PPS threads are reaped when GPSD is signaled.Eric S. Raymond2013-11-171-15/+18
|
* Try to ensure that threads don't keep running after gpsd is signalled.Eric S. Raymond2013-11-171-0/+4
|
* Introduce new LOG_CLIENT looging level.Eric S. Raymond2013-11-161-5/+5
|
* Revert "Don't condition out thread locks when PPS disabled..."Eric S. Raymond2013-11-151-0/+2
| | | | scons pps=false check hangs with this change.
* Don't condition out thread locks when PPS disabled, gpsmon will need them.Eric S. Raymond2013-11-151-2/+0
| | | | All regression tests pass. PPS is live.
* Change the PPS bar over to a JSON drift message.Eric S. Raymond2013-11-141-16/+12
| | | | gpsmon can't see this yet. That's next.
* ppsbar -> pps.Eric S. Raymond2013-11-131-1/+1
| | | | All regression tests pass. PPS is live in both gpsd and gpsmon.
* Clean up an obsolete comment and redundant #ifdef.Eric S. Raymond2013-11-131-6/+0
| | | | All regression tests pass. PPS is live in both gpsd and gpsmon.
* More consistent ise of LOG_PROG.Eric S. Raymond2013-11-121-7/+11
| | | | This logging level is intended to directly explain accompanying I/O messages.
* Make interpretation of the split24 flag propperly per-subscriber.Eric S. Raymond2013-11-101-0/+6
| | | | | | | | This involved moving some out of the AIS driver. There is a related small change in behavior; now, if split24 is on, the Type B half of a matched pair will be shipped with type 'both'. All regression tests pass. PPS is live.
* PPS events now show in gpsmon runb through the daemon.Eric S. Raymond2013-11-091-0/+12
|
* Fix inexplicably inserted whitespace.Eric S. Raymond2013-11-091-4/+2
|
* Code is fully cppcheck, splint, and Coverity clean.Eric S. Raymond2013-11-061-0/+1
| | | | All regression tests pass. PPS is live.
* Remove code which Coverity correctly calls out as statically dead.Eric S. Raymond2013-11-061-5/+1
|
* splint cleanup.Eric S. Raymond2013-11-061-1/+5
|
* Fix compiler warnings with clang 4.2 on OS X 10.7.5Beat Bolli2013-11-061-2/+2
| | | | | | | | | | | On OS X, /usr/include/sys/termios.h typedefs speed_t as unsigned long. On Linux, it is an unsigned int. This causes printf() format string warnings. Fix this by down-casting to an unsigned int and using "%u" as format. Also discard a close() result. Signed-off-by: Beat Bolli <bbolli@ewanet.ch> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Sets precision inside ntpshm_put().Michael Tatarinov2013-11-061-2/+1
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Simplify the PPS hook.Michael Tatarinov2013-11-061-2/+1
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* ntpshm_pps() is gone.Michael Tatarinov2013-11-061-5/+19
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* C variables are case insensitive, but still nice to have matching case.Gary E. Miller2013-11-051-1/+1
| | | | | Should be no functional change. Thanks to: Michael Tatarinov <kukabu@gmail.com>
* Suppress JSON notifications to clients who haven't enabled them.Eric S. Raymond2013-11-051-2/+2
|
* Use timedrift_t for all hook arguments.Eric S. Raymond2013-11-031-4/+5
| | | | | | | | | No logic changes in this commit. We push naosecond precision closer to where time hints are shipped. Changes to ppsthread.c are kept minimal; it needs a cleanup but that will be done in another change that can be separately reviewed. All regression tests pass. PPS is live in gpsmon and reported by gpsd.
* There is no longer any reason that > 1 PPS threads can't run.Eric S. Raymond2013-11-021-6/+3
|
* Eliminate an enable flag that always gets set true.Eric S. Raymond2013-11-021-3/+1
| | | | All regression tests pass. PPS is live.