gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Recent changes to NTPSHM relating to nsec fields


From: Mick Durkin
Subject: [gpsd-dev] Recent changes to NTPSHM relating to nsec fields
Date: Tue, 05 Nov 2013 17:39:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Hi Gary,

I've been following the moves to include nanosecond fields and I saw what I think is a problem with a recent change; an assignment to an apparently wrong field.

Here is what I think is wrong:-

diff --git a/ntpshm.c b/ntpshm.c
index e984255..dbe5c10 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -341,7 +341,7 @@ static int ntpshm_pps(struct gps_device_t *session,
     shmTimeP->count++;
     shmTimeP->clockTimeStampSec = (time_t)actual_ts->tv_sec;
     shmTimeP->clockTimeStampUSec = (int)(actual_ts->tv_nsec/1000);
-    shmTimeP->clockTimeStampUSec = (unsigned)actual_ts->tv_nsec;
+    shmTimeP->clockTimeStampNSec = (unsigned)actual_ts->tv_nsec;
     shmTimeP->receiveTimeStampSec = (time_t)clock_ts->tv_sec;
     shmTimeP->receiveTimeStampUSec = (int)(clock_ts->tv_nsec/1000);
     shmTimeP->receiveTimeStampNSec = (unsigned)clock_ts->tv_nsec;


BR

Mick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]