From: Juergen Perlinger Date: Fri, 22 Aug 2014 20:14:11 +0000 (+0200) Subject: [Bug 2636] Clutter in syslog if gpsd not running X-Git-Tag: NTP_4_2_7P465~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=346efde89ae616b60011ebd781015006f8695f6b;p=thirdparty%2Fntp.git [Bug 2636] Clutter in syslog if gpsd not running - log GPSD revision and release numbers with protocol version bk: 53f7a4939tfVtwPplArlstrVJteuIQ --- diff --git a/ChangeLog b/ChangeLog index ea3f87b88..852cb021d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ * [Bug 2636] Clutter in syslog if gpsd not running - found (hopefully) last cause for clutter in protocol version + - log GPSD revision and release numbers with protocol version (4.2.7p464) 2014/08/22 Released by Harlan Stenn * [Bug 2636] Fix coverity warning from previous patch. (4.2.7p463) 2014/08/21 Released by Harlan Stenn diff --git a/ntpd/refclock_gpsdjson.c b/ntpd/refclock_gpsdjson.c index 2ff321aca..615098271 100644 --- a/ntpd/refclock_gpsdjson.c +++ b/ntpd/refclock_gpsdjson.c @@ -782,8 +782,14 @@ process_version( int len; char * buf; + const char *revision; + const char *release; /* get protocol version number */ + revision = json_object_lookup_string_default( + jctx, 0, "rev", "(unknown)"); + release = json_object_lookup_string_default( + jctx, 0, "release", "(unknown)"); errno = 0; up->proto_major = (uint16_t)json_object_lookup_int( jctx, 0, "proto_major"); @@ -793,8 +799,9 @@ process_version( up->fl_vers = -1; if (syslogok(pp, up)) msyslog(LOG_INFO, - "%s: GPSD protocol version %u.%u", + "%s: GPSD revision=%s release=%s protocol=%u.%u", refnumtoa(&peer->srcadr), + revision, release, up->proto_major, up->proto_minor); }