gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Possible Bug in libgpsd_core.c


From: Neustifter Andreas
Subject: Re: [gpsd-dev] Possible Bug in libgpsd_core.c
Date: Fri, 1 Feb 2019 08:04:19 +0000

Hej Gary!

> From: gpsd-dev On Behalf Of Gary E. Miller, Sent: Freitag, 25. Jänner 2019 
> 22:06
>
> > Attached a patch that attempts to fix this behavior, any thoughts on
> > that?
>
> Basically this:
>
> -/* don't downgrade mode if holding previous fix */
> -if (session->gpsdata.fix.mode > session->newdata.mode)
> +if (received & MODE_SET) {
> +    gpsd_log(&session->context->errout, LOG_PROG, "mode change: was
> %d is %d\n", session->gpsdata.fix.mode, session->newdata.mode);
> +} else {
>      session->gpsdata.set &= ~MODE_SET;
> +}
>
> I agree the current behavior is wrong, the fix is harder to downgrade than it
> should be.  But your fix is internally inconsistent.  Just because the 
> MODE_SET bit
> is set does not mean the mode changed.
>
> When the code description does not match the code, then it is clear not enough
> thought is in the patch.

Yes, sorry about that, the patch was actually quite sloppy in retrospect.

> While the old code is problematic, the new code is just misleading.  It unsets
> MODE-SET, only when it is not set!  gpsdata.set was just set from received, so
> their MODE_SET is always the same.
>
> I'm just finishing up fixing some SiRFstar bugs, when that is under control 
> I'lll
> come back to this bug.

We currently just drop the whole section and the GPSd works as expected (by us) 
by downgrading the fix. I can also see that the regression test are failing big 
time since the downgrade is actually reported to the clients. Most probably 
this has unintended consequences for the majority of GPSd users.

Not sure what is the best way forward for that issue.

Andreas



The information contained in this e-mail message is privileged and confidential 
and is for the exclusive use of the addressee. The person who receives this 
message and who is not the addressee, one of his employees or an agent entitled 
to hand it over to the addressee, is informed that he may not use, disclose or 
reproduce the contents thereof, and is kindly asked to notify the sender and 
delete the e-mail immediately.


reply via email to

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