bugGPSD - Bugs: bug #51771, gpsd will nt pass time to NTP from...

 
 

bug #51771: gpsd will nt pass time to NTP from a pty

Submitted by:  Gary E. Miller <garyemiller>
Submitted on:  Wed 16 Aug 2017 11:41:12 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 16 Aug 2017 11:41:12 PM UTC, original submission:

A user has gpsd connecting to a local pty to get GPS data. The same way gpsfake does. When gpsd detects it is reading from a pty it will not pass time to NTP. This breaks the customers setup.

Here is the code, and his patch:

```

diff --git a/timehint.c b/timehint.c
index c33a3d36..56578c96 100644
--- a/timehint.c
+++ b/timehint.c
@@ -431,8 +431,8 @@ void ntpshm_link_activate(struct gps_device_t *session)
/* set up ntpshm storage for a session */
{
/* don't talk to NTP when we're running inside the test harness */
- if (session->sourcetype == source_pty)
- return;
+// if (session->sourcetype == source_pty)
+// return;

if (session->sourcetype != source_pps ) {
/* allocate a shared-memory segment for "NMEA" time data */

```

Not a good solution as when the user runs gpsfake it will send bad time to NTP. gpsd needs a better way to detect input from gpsfake, or maybe a flag to gpsd so NTP can be disabled manually.

Gary E. Miller <garyemiller>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by garyemiller (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3