summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-17 19:47:47 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-17 19:47:47 +0000
commit6dcf899894786dd2814bbe955474215f4da19680 (patch)
tree6f806a465b03de8f229307e097431c7dfab835f6
parentbacd3415fe17a41f092451eac1c33667686c2d9a (diff)
downloadgpsd-6dcf899894786dd2814bbe955474215f4da19680.tar.gz
Add code for changing modes in devconfig.
-rw-r--r--gpsd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index 6979e212..06f535c9 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -71,7 +71,7 @@
* Timeout policy. We can't rely on clients closing connections
* correctly, so we need timeouts to tell us when it's OK to
* reclaim client fds. ASSIGNMENT_TIMEOUT fends off programs
- * that open connections and just sit there, not issuing a W or
+ * that open connections and just sit there, not issuing a WATCH or
* doing anything else that triggers a device assignment. Clients
* in watcher or raw mode that don't read their data will get dropped
* when throttled_write() fills up the outbound buffers and the
@@ -1652,7 +1652,7 @@ static void handle_newstyle_request(struct subscriber_t *sub,
for(devp = devices; devp < devices + MAXDEVICES; devp++)
if (allocated_device(devp))
(void)assign_channel(sub, ANY, devp);
- /* dump all devices */
+ /* display the user's policy */
json_watch_dump(&sub->policy,
reply + strlen(reply),
replylen - strlen(reply));
@@ -1705,7 +1705,8 @@ static void handle_newstyle_request(struct subscriber_t *sub,
/* now that channel is selected, apply changes */
if (devconf.native != channel->device->gpsdata.driver_mode)
channel->device->device_type->mode_switcher(channel->device, devconf.native);
- // FIXME: change speed and serialmode */
+ set_serial(channel->device,
+ (speed_t)devconf.bps, devconf.serialmode);
}
}
buf = end;