diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-03-14 18:59:02 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-03-14 18:59:02 -0400 |
commit | ff4a1c4e70d5bcb05313e0ed234a5daa263290e4 (patch) | |
tree | 536e48569e2e5cd6047065e6f4204e7eb98b7103 | |
parent | 4ef28bd667515c060015565a9ddf180acf6aedcb (diff) | |
download | gpsd-ff4a1c4e70d5bcb05313e0ed234a5daa263290e4.tar.gz |
Make the library default to new protocol rather than old.
Old-protocol support is still present.
-rw-r--r-- | libgps_core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libgps_core.c b/libgps_core.c index ac6b0ca3..3682d058 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -701,11 +701,9 @@ int gps_stream(struct gps_data_t *gpsdata, char buf[GPS_JSON_COMMAND_MAX]; if ((flags & (WATCH_JSON|WATCH_OLDSTYLE|WATCH_NMEA|WATCH_RAW))== 0) { - if (PRIVATE(gpsdata)->newstyle || (flags & WATCH_NEWSTYLE)!=0) - flags |= WATCH_JSON; - else - flags |= WATCH_OLDSTYLE; + flags |= WATCH_JSON; } + if (flags & POLL_NONBLOCK) (void)fcntl(gpsdata->gps_fd, F_SETFL, O_NONBLOCK); if ((flags & WATCH_DISABLE) != 0) { |