diff options
author | Gleb Smirnoff <glebius@glebius.int.ru> | 2011-07-04 18:16:22 +0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-07-04 19:37:54 -0400 |
commit | 5af170931cdeb63d84ad584361601b0c182f3bca (patch) | |
tree | 5bb8d6b3a928c9cc440da3b44cbafb358b508b70 /gpsd.c | |
parent | bd4c37d3464fefccfff3ce3c2236de09140e8d79 (diff) | |
download | gpsd-5af170931cdeb63d84ad584361601b0c182f3bca.tar.gz |
Consider a device subscribed inly if the subscriber has requested WATCH on it.
This fixes a bug introduced by glebius's earlier patch. Actually this
bug might have been causing subtle problems since 2.95. All regression
tests pass.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -511,7 +511,7 @@ struct subscriber_t #define MAXSUBSCRIBERS FD_SETSIZE #endif -#define subscribed(sub, devp) (sub->policy.devpath[0]=='\0' || strcmp(sub->policy.devpath, devp->gpsdata.dev.path)==0) +#define subscribed(sub, devp) (sub->policy.watcher && (sub->policy.devpath[0]=='\0' || strcmp(sub->policy.devpath, devp->gpsdata.dev.path)==0)) static struct subscriber_t subscribers[MAXSUBSCRIBERS]; /* indexed by client file descriptor */ |