diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 11:47:19 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 11:47:19 -0500 |
commit | 25fb04476ddb433a108121f74f356e76e44a6a95 (patch) | |
tree | 69577707141e703513387735ebd9da35c55cdad5 /net_ntrip.c | |
parent | 6b3fd224e1e2d2e6f086924a6148712a4a445a2c (diff) | |
download | gpsd-25fb04476ddb433a108121f74f356e76e44a6a95.tar.gz |
Eliminate the context->netgnss_service member.
This is more global context that really needed to be per-device state. Instead,
create a per-devicd servicetype member to carry this information. Practically
apeaking, this means gpsd can now watch multiple NTRIP and DGPS sessions without
getting confused.
All regressuin tests pass.
Diffstat (limited to 'net_ntrip.c')
-rw-r--r-- | net_ntrip.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net_ntrip.c b/net_ntrip.c index b12e8e32..ebcc01cf 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -471,10 +471,10 @@ int ntrip_open(struct gps_device_t *device, char *caster) int ret; char t[strlen(caster + 1)]; char *tmp = t; - struct gps_context_t *context = device->context; switch (device->driver.ntrip.conn_state) { case ntrip_conn_init: + device->servicetype = service_ntrip; ntrip_stream.set = false; (void)strlcpy(tmp, caster, strlen(caster)); @@ -515,7 +515,6 @@ int ntrip_open(struct gps_device_t *device, char *caster) } /* this has to be done here, because it is needed for multi-stage connection */ - context->netgnss_service = netgnss_ntrip; strncpy(ntrip_stream.mountpoint, stream, 101); /* magic numbers from struct definitions */ strncpy(ntrip_stream.credentials, auth, 128); /* magic numbers from struct definitions */ strncpy(ntrip_stream.url, url, 256); |