summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-02 18:11:28 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-02 18:11:28 -0500
commitc6e577c4689fa99de93657df21779651a9b5df0e (patch)
tree1831547eab8509ccb74e79f9914dc4f4b0c8b9c2 /gpsctl.c
parent0a854b97c6bc238e2f423cfeb94c88fa53eead99 (diff)
downloadgpsd-c6e577c4689fa99de93657df21779651a9b5df0e.tar.gz
Trivial fix for a segfault problem.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 2db6f6a5..7abcd85c 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -21,7 +21,7 @@
#include "revision.h"
static int debuglevel;
-static unsigned int timeout = 4;
+static unsigned int timeout = 8;
/*
* Set this as high or higher than the maximum number of subtype
@@ -548,9 +548,9 @@ int main(int argc, char **argv)
gpsd_report(LOG_ERROR,
"autodetection failed.\n");
exit(2);
- } else {
+ } else if (session.packet.type > COMMENT_PACKET) {
gpsd_report(LOG_IO,
- "autodetection after %d reads.\n", seq);
+ "autodetection after %d reads finds packet type %d.\n", seq, session.packet.type);
(void) alarm(0);
break;
}