summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-04-09 19:17:16 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-04-09 19:17:16 -0400
commitd6c1a9c97365e69341b6317648d755b523a4b67c (patch)
tree566877db9f5cd729be36be31b44fd0ea0247a1bf /gpsmon.c
parent542fbcdc813478e817c47a7fc11e4eb5774c2d83 (diff)
downloadgpsd-d6c1a9c97365e69341b6317648d755b523a4b67c.tar.gz
Make the client library and daemon use different sets of state-flag masks.
Large patch, no actual executable code changes except in three debug dumpers. Breaks up the *_SET status macros so the client side continues to use them, but the daemon uses a similarly-named set with an _IS suffix. This frees up two mask bits in both sets - the client side no longer needs to have REPORT_SET and CLEAR_SET bits, and the daemon side no longer needs to have VERSION_SET and POLICY_SET. The only actual code change is that the maskdump.c module, generated by maskaudit.py, splits in half - one child now dumps client-side flags, the other daemon-side flags. One other function call in a debug dumper in libgps_core.c changes. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 7b193bfb..ff173c48 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -181,12 +181,12 @@ static ssize_t readpkt(void)
if (changed == 0)
longjmp(terminate, TERM_EMPTY_READ);
- if ((changed & ERROR_SET) != 0)
+ if ((changed & ERROR_IS) != 0)
longjmp(terminate, TERM_READ_ERROR);
if (logfile != NULL) {
/*@ -shiftimplementation -sefparams +charint @*/
- assert(fwrite(session.packet.outbuffer, sizeof(char), session.packet.outbuflen,
+ assert(fwrite(session.packet.outbuffer, sizeof(char), session.packet.outbuflen,
logfile) >= 1);
/*@ +shiftimplementation +sefparams -charint @*/
}