summaryrefslogtreecommitdiff
path: root/lcdgps.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2011-02-14 04:01:47 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-14 04:01:47 -0500
commit1f537e200bf585ba7f3156fbfd0a97876472a7a9 (patch)
treed37009d664a018d6374ab9ff1e0d66b941cb4691 /lcdgps.c
parente6d9ba1533e56fc623c9bed9e605a60a7ae95b45 (diff)
downloadgpsd-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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lcdgps.c b/lcdgps.c
index 9246912c..6bdb1199 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -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 */