summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2011-01-03 18:37:02 -0800
committerGary E. Miller <gem@rellim.com>2011-01-03 18:37:02 -0800
commitc31de5d55ed2078a84bca4ae85e2e1b9208c612b (patch)
tree066e9b570687735b7c6aa00e58418ec5da29271a /subframe.c
parent4707b8c7325df4f9b98c48bca76ba130f46482f7 (diff)
downloadgpsd-c31de5d55ed2078a84bca4ae85e2e1b9208c612b.tar.gz
A lot of subframes are invalid, only SUBFRAME_IS on good ones.
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/subframe.c b/subframe.c
index aeda6bf5..2b4fa315 100644
--- a/subframe.c
+++ b/subframe.c
@@ -132,7 +132,7 @@ static void subframe_almanac(unsigned int tSVID, uint32_t words[],
almp->d_af1);
}
-void gpsd_interpret_subframe(struct gps_device_t *session,
+gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
unsigned int tSVID, uint32_t words[])
{
/*
@@ -169,7 +169,7 @@ void gpsd_interpret_subframe(struct gps_device_t *session,
gpsd_report(LOG_WARN,
"50B: gpsd_interpret_subframe bad preamble: 0x%x header 0x%x\n",
preamble, words[0]);
- return;
+ return 0;
}
subp->integrity = ((words[0] >> 1) & 0x01);
/* The subframe ID is in the Hand Over Word (page 80) */
@@ -816,9 +816,10 @@ void gpsd_interpret_subframe(struct gps_device_t *session,
break;
default:
/* unknown/illegal subframe */
+ return 0;
break;
}
- return;
+ return SUBFRAME_IS;
}
/*@ +usedef @*/