diff options
author | Gary E. Miller <gem@rellim.com> | 2015-08-18 12:57:11 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-08-18 12:57:11 -0700 |
commit | 9b3687772bffc2762c78875ab6a1eb047273d557 (patch) | |
tree | 1ac83e1ed7e50a7f39ff9a54130318dd46b97a98 /ppsthread.c | |
parent | ad08db4ae1f7c9f273a8b7e788544c9ef1445e78 (diff) | |
download | gpsd-9b3687772bffc2762c78875ab6a1eb047273d557.tar.gz |
Make KPPS logging a bit less alarmist.
Failure to get a time stamp is not an error, at worst it is a WARN
and at best an INFO. Since some GPS do not emit PPS when they have
no time lock it is just a state with no valid time.
Diffstat (limited to 'ppsthread.c')
-rw-r--r-- | ppsthread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ppsthread.c b/ppsthread.c index 81522ec7..e01c4c4d 100644 --- a/ppsthread.c +++ b/ppsthread.c @@ -529,13 +529,16 @@ static int get_edge_rfc2783(struct inner_context_t *inner_context, char errbuf[BUFSIZ] = "unknown error"; (void)strerror_r(errno, errbuf, sizeof(errbuf)); - thread_context->log_hook(thread_context, THREAD_ERROR, - "KPPS:%s kernel PPS failed %s\n", - thread_context->devicename, errbuf); if ( ETIMEDOUT == errno || EINTR == errno ) { /* just a timeout */ + thread_context->log_hook(thread_context, THREAD_INF, + "KPPS:%s kernel PPS timeout %s\n", + thread_context->devicename, errbuf); return 1; } + thread_context->log_hook(thread_context, THREAD_WARN, + "KPPS:%s kernel PPS failed %s\n", + thread_context->devicename, errbuf); return 0; } if ( inner_context->pps_canwait ) { |