summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-21 16:17:21 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-21 16:18:16 -0500
commit4c10af8ad0944b17f046653bc16bc52c8462d88e (patch)
treed3b79013590aeb06830a3945edd178193693a2f8 /libgpsd_core.c
parentf6a987466c0fd4eb0829a3e4490281f56d4f7428 (diff)
downloadgpsd-4c10af8ad0944b17f046653bc16bc52c8462d88e.tar.gz
NTRIP fixes from Andre Naujoks.
I fixed them up to splint clean.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index e8051bcd..0934dc6a 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -161,9 +161,11 @@ void gps_context_init(struct gps_context_t *context)
.readonly = false,
.sentdgps = false,
.netgnss_service = netgnss_none,
+ .ntrip_conn_state = ntrip_conn_init,
+ .ntrip_sourcetable_parse = false,
+ .ntrip_works = false,
.fixcnt = 0,
.dsock = -1,
- .netgnss_privdata = NULL,
.rtcmbytes = 0,
.rtcmbuf = {'\0'},
.rtcmtime = 0,
@@ -732,7 +734,7 @@ int gpsd_activate(struct gps_device_t *session)
gpsd_run_device_hook(session->gpsdata.dev.path, "ACTIVATE");
/* special case: source may be a URI to a remote GNSS or DGPS service */
if (netgnss_uri_check(session->gpsdata.dev.path)) {
- session->gpsdata.gps_fd = netgnss_uri_open(session->context,
+ session->gpsdata.gps_fd = netgnss_uri_open(session,
session->gpsdata.dev.path);
session->sourcetype = source_tcp;
gpsd_report(LOG_SPIN,
@@ -789,25 +791,6 @@ int gpsd_activate(struct gps_device_t *session)
if (session->gpsdata.gps_fd < 0)
return -1;
else {
-#ifdef NON_NMEA_ENABLE
- const struct gps_type_t **dp;
-
- /*@ -mustfreeonly @*/
- for (dp = gpsd_drivers; *dp; dp++) {
- (void)tcflush(session->gpsdata.gps_fd, TCIOFLUSH); /* toss stale data */
- if ((*dp)->probe_detect != NULL
- && (*dp)->probe_detect(session) != 0) {
- gpsd_report(LOG_PROG, "probe found %s driver...\n",
- (*dp)->type_name);
- session->device_type = *dp;
- gpsd_assert_sync(session);
- goto foundit;
- }
- }
- /*@ +mustfreeonly @*/
- gpsd_report(LOG_PROG, "no probe matched...\n");
- foundit:
-#endif /* NON_NMEA_ENABLE */
gpsd_clear(session);
gpsd_report(LOG_INF,
"gpsd_activate(): activated GPS (fd %d)\n",