summaryrefslogtreecommitdiff
path: root/cgps.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2006-09-04 17:54:47 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2006-09-04 17:54:47 +0000
commite6384da0ab49d552953c76509b28acaeb6a521c8 (patch)
tree012b3cce32f3a19c5d5610016484a5fa69741db4 /cgps.c
parent3828e962870730a5f973372c37c2af5de96498c3 (diff)
downloadgpsd-e6384da0ab49d552953c76509b28acaeb6a521c8.tar.gz
Don't let cgps spin if read fails. Prompted by Petr Slansky on gpsd-dev.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgps.c b/cgps.c
index ab70e1da..42ecae5c 100644
--- a/cgps.c
+++ b/cgps.c
@@ -457,7 +457,8 @@ int main(int argc, char *argv[])
}
else if( data ) {
/* code that calls gps_poll(gpsdata) */
- (void)gps_poll(gpsdata);
+ if (gps_poll(gpsdata) != 0)
+ die(1);
}
/* Check for user input. */