diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-24 11:27:11 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-24 11:27:11 -0400 |
commit | 4bf5e0bd3a766511cf273ffd7162af9f2f8e64fb (patch) | |
tree | 2290ffa965632d6a0ce304f7ffe95d68d93ae1ff /gpsctl.c | |
parent | 218fe292eb7f71239a035e6d99f7c2d5339d96df (diff) | |
download | gpsd-4bf5e0bd3a766511cf273ffd7162af9f2f8e64fb.tar.gz |
Properly free devices when select() sees bad fds for them.
Diffstat (limited to 'gpsctl.c')
-rw-r--r-- | gpsctl.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -665,19 +665,15 @@ int main(int argc, char **argv) /* grab packets until we time out, get sync, or fail sync */ for (hunting = true; hunting; ) { -#ifdef EFDS fd_set efds; -#endif /* EFDS */ switch(gpsd_await_data(&rfds, maxfd, &all_fds, context.debug)) { case AWAIT_GOT_INPUT: break; case AWAIT_NOT_READY: -#ifdef EFDS /* no recovery from bad fd is possible */ if (FD_ISSET(session.gpsdata.gps_fd, &efds)) exit(EXIT_FAILURE); -#endif /* EFDS */ continue; case AWAIT_FAILED: exit(EXIT_FAILURE); |