summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-04-07 15:16:07 -0700
committerGary E. Miller <gem@rellim.com>2016-04-07 15:16:07 -0700
commit79cabdcfb3857ff201c581037586ac610639bc80 (patch)
treea24e5dae16fba9802033fc0afe75dcf11df3d73a /gps
parent2c602631f4fa04c683609fbeb0233b8a0000fd47 (diff)
downloadgpsd-79cabdcfb3857ff201c581037586ac610639bc80.tar.gz
Fixes client.py bug ausing RTCM3.2 regression-test failures.
When an entire 4K buffer of packet data contains no newlines, it's simply retained for future use. But the code was failing to clear the previous response in that case, causing the caller to see duplicate data. Since this bug only mattered with lines longer than 4K bytes, and since even then it varied as a function of the alignment of lines vs. 4K boundaries, it was never seen on previous regression tests. TESTED: Ran "scons build-all check" with the updated code and the corrected test data for RTCM3.2. Signed-off-by: Gary E. Miller <gem@rellim.com>
Diffstat (limited to 'gps')
-rw-r--r--gps/client.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gps/client.py b/gps/client.py
index 7ee62fea..d540e211 100644
--- a/gps/client.py
+++ b/gps/client.py
@@ -110,6 +110,7 @@ class gpscommon:
if self.verbose > 1:
sys.stderr.write("poll: returning 0.\n")
# Read succeeded, but only got a fragment
+ self.response = '' # Don't duplicate last response
return 0
else:
if self.verbose > 1: