Commit Graph

10 Commits

Author SHA1 Message Date
Harald Welte 019d2535b6 Allow user to specify a non-standard gpsd port
.. which is required on the ODU.
2014-12-20 15:46:56 +01:00
Harald Welte 75cbc3d0e5 Allow configuration of number of retconnect-attempts/interval 2014-12-20 15:44:30 +01:00
Harald Welte c77a9b3342 reconnect to gpsd if it disappears while we wait for fix/time
In some cases, gpsd might die while we are waiting to receive a valid
fix/time information.  In that case, we have to reconnect to gpsd
again and again, until a valid time has been received (and set as
system clock).
2013-10-14 10:39:34 +02:00
Harald Welte cb65bc5348 avoid using 99% CPU in case gpsd dies
This addresses and issue when gpsdate is running and the gpsd will be
killed (testing coredump handling).

The issue is within the libgps cod itself that doesn't handle the
result(0) of the recv syscall correctly and keeps on looping. Now in a
normal system gpsdate should only execute at the beginning and exit once
there is a date. So the window for this runtime failure is quite low.

Bug reported by Holger Freyther.
2013-08-29 17:12:25 +02:00
Harald Welte 58e3cdeb19 run until we receive valid GPS timestamp 2013-04-10 15:15:35 +02:00
Harald Welte 4ad6c932c9 daemonize after gpsd connection is established; gps fix might take time 2013-04-10 14:06:25 +02:00
Harald Welte 3b870221a9 gpsdate: log the actual time that was set to the RTC. 2013-04-10 12:23:16 +02:00
Harald Welte f56f16539b use syslog() for reporting errors and status 2013-04-10 12:16:33 +02:00
Harald Welte a1aa41e813 perform up to 60 attmepts to re-connect to gpsd and print more status 2013-04-10 12:11:12 +02:00
Harald Welte 346b5d00a9 initial checkin of 'gpsdate' program 2013-04-10 10:47:19 +02:00