summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-24 11:47:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-24 11:47:19 -0500
commit25fb04476ddb433a108121f74f356e76e44a6a95 (patch)
tree69577707141e703513387735ebd9da35c55cdad5 /serial.c
parent6b3fd224e1e2d2e6f086924a6148712a4a445a2c (diff)
downloadgpsd-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/serial.c b/serial.c
index 387d7f6f..bc67939c 100644
--- a/serial.c
+++ b/serial.c
@@ -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