[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] git head broken
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] git head broken |
Date: |
Tue, 5 Nov 2013 15:48:16 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Gary E. Miller <address@hidden>:
> I have narrowed it down to a failure to autobaud. More to come.
I was afraid of this.
Find this code in libgpsd_core.c:
static bool hunt_failure(struct gps_device_t *session)
/* after a bad packet, what should cue us to go to next autobaud setting? */
{
/*
* Fail hunt only if we get a second consecutive bad packet
* and the lexer is in ground state. We don't want to fail on
* a first bad packet because the source might have a burst of
* leading garbage after open. We don't want to fail if the
* lexer is not in ground state, because that means the read
* might have picked up a valid partial packet - better to go
* back around the loop and pick up more data.
*
* It has been reported that the "&& session->packet.state==0"
* guard causes a hang while autobauding on SiRF IIIs (but not on
* SiRF-IIs, oddly enough). Removing this conjunct will resurrect
* chronic failure to sync on TCP/IP sources, which have I/O
* boundaries in mid-packet more often than RS232 ones. There's a
* test for this at test/daemon/tcp-torture.log.
*
* This test may need further revision.
*/
return session->badcount++>1 && session->packet.state==0;
}
Please remove the conjuct "&& session->packet.state==0" and tell me if
SiRF-III and GR601-W start being reliable again.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
signature.asc
Description: Digital signature