diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 13:12:25 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 13:12:25 -0500 |
commit | 829c3a3b0295ff653e4a14f2a7087e20940a7c0f (patch) | |
tree | b528405a4bbcd631c35aa7968149cfb67cb21fe2 /gpsd.h-tail | |
parent | 7e0ac597b057ed4119a76f4e33f2a5a304fc1c0a (diff) | |
download | gpsd-829c3a3b0295ff653e4a14f2a7087e20940a7c0f.tar.gz |
The NTRIP connection state musn't be zeroed on gpsd_activate().
Andre Naujoks informed me of this.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 4f9fa3e9..2c139d02 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -516,27 +516,6 @@ struct gps_device_t { unsigned int bufindex; } isgps; #endif /* BINARY_ENABLE */ - - /* - * State of an NTRIP connection. Havoc will ensue if ntrip_conn_init - * is not 0, as this is initialized by memset(... '\0', ...). - */ - struct { - enum { - ntrip_conn_init, - ntrip_conn_sent_probe, - ntrip_conn_sent_get, - ntrip_conn_established, - ntrip_conn_err - } conn_state; /* connection state for multi stage connect */ - bool works; /* marks a working connection, so we try to reconnect once */ - bool sourcetable_parse; /* have we read the sourcetable header? */ - } ntrip; - - /* State of a DGPSIP connection */ - struct { - bool reported; - } dgpsip; } driver; /* * Auxiliary structures for parsing data that can be interleaved with @@ -556,6 +535,25 @@ struct gps_device_t { double d_decode_time; /* daemon end-of-decode time (-> D1) */ double emit_time; /* emission time (-> E2) */ #endif /* TIMING_ENABLE */ + /* + * State of an NTRIP connection. We don't want to zero this on every + * activation, otherwise the connection state will get lost + */ + struct { + enum { + ntrip_conn_init, + ntrip_conn_sent_probe, + ntrip_conn_sent_get, + ntrip_conn_established, + ntrip_conn_err + } conn_state; /* connection state for multi stage connect */ + bool works; /* marks a working connection, so we try to reconnect once */ + bool sourcetable_parse; /* have we read the sourcetable header? */ + } ntrip; + /* State of a DGPSIP connection */ + struct { + bool reported; + } dgpsip; }; /* logging levels */ |