diff options
author | Jeffrey Hutzelman <jhutz@cmu.edu> | 2013-02-18 17:06:38 -0500 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2013-02-27 00:08:24 -0500 |
commit | 864eb7e746c2d3a1fe03d230d01d74de97160b63 (patch) | |
tree | 363e85afa9839655a3fd4bc2c8258666ed4f15ce /get_vers.sh | |
parent | a323589383be38de2f76b564c5edc493bf7f9ec2 (diff) |
Treat obviously non-zephyr packets as bad
When Z_ReadWait receives a packet which doesn't start with a zephyr
version header, it considers the packet to be "obviously non-zephyr".
Such packets are discarded and, previously, caused Z_ReadWait to return
ZERR_NONE. Unfortunately, this can cause things to block for up to 60s
when a caller was expecting a non-blocking call to pick up a new packet
if there is one.
This changes Z_ReadWait to return ZERR_BADPKT in this situation,
eliminating the potential wait.
This fixes #100
Diffstat (limited to 'get_vers.sh')
0 files changed, 0 insertions, 0 deletions