diff options
author | Michael Tatarinov <kukabu@gmail.com> | 2011-02-14 04:01:47 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-14 04:01:47 -0500 |
commit | 1f537e200bf585ba7f3156fbfd0a97876472a7a9 (patch) | |
tree | d37009d664a018d6374ab9ff1e0d66b941cb4691 /lcdgps.c | |
parent | e6d9ba1533e56fc623c9bed9e605a60a7ae95b45 (diff) | |
download | gpsd-1f537e200bf585ba7f3156fbfd0a97876472a7a9.tar.gz |
In gpxlogger, filter for device on the server rather than client side,
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'lcdgps.c')
-rw-r--r-- | lcdgps.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -225,10 +225,6 @@ static void update_lcd(struct gps_data_t *gpsdata) char *s; int track; - /* this is where we implement source-device filtering */ - if (gpsdata->dev.path[0] && source.device!=NULL && strcmp(source.device, gpsdata->dev.path) != 0) - return; - /* Get our location in Maidenhead. */ latlon2maidenhead(maidenhead,gpsdata->fix.latitude,gpsdata->fix.longitude); @@ -459,7 +455,10 @@ int main(int argc, char *argv[]) reset_lcd(); /* Here's where updates go. */ - gps_stream(&gpsdata, WATCH_ENABLE, NULL); + unsigned int flags = WATCH_ENABLE; + if (source.device != NULL) + flags |= WATCH_DEVICE; + (void)gps_stream(&gpsdata, flags, source.device); for (;;) { /* heart of the client */ |