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 /serial.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 'serial.c')
-rw-r--r-- | serial.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -369,6 +369,7 @@ int gpsd_open(struct gps_device_t *session) gpsd_report(LOG_SPIN, "TCP device opened on fd %d\n", dsock); session->gpsdata.gps_fd = dsock; session->sourcetype = source_tcp; + session->servicetype = service_sensor; return session->gpsdata.gps_fd; /* or could be UDP */ } else if (strncmp(session->gpsdata.dev.path, "udp://", 6) == 0) { @@ -392,6 +393,7 @@ int gpsd_open(struct gps_device_t *session) gpsd_report(LOG_SPIN, "UDP device opened on fd %d\n", dsock); session->gpsdata.gps_fd = dsock; session->sourcetype = source_udp; + session->servicetype = service_sensor; return session->gpsdata.gps_fd; } @@ -400,6 +402,7 @@ int gpsd_open(struct gps_device_t *session) */ session->sourcetype = gpsd_classify(session->gpsdata.dev.path); + session->servicetype = service_sensor; /*@ -boolops -type @*/ if (session->context->readonly |