summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-28 16:51:39 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-28 16:51:39 -0400
commit7e491e8ac2f1dfe0b93b7949084fe337338ed195 (patch)
treeddb1417793c4aa321cbbef14837f81a5141da67a /gpsmon.c
parentb8d496f30153630f2a3fd0a820b3b0e2ff61d407 (diff)
downloadgpsd-7e491e8ac2f1dfe0b93b7949084fe337338ed195.tar.gz
Restore file descriptor properly after control-send.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 8239dfac..1986f39b 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -328,7 +328,7 @@ bool monitor_control_send( /*@in@*/ unsigned char *buf, size_t len)
if (!serial) {
/* stop pretending now */
- session.gpsdata.gps_fd = controlfd;
+ session.gpsdata.gps_fd = savefd;
/* enough room for "ERROR\r\n\0" */
/*@ -sefparams @*/
assert(read(controlfd, buf, 8) != -1);