diff options
author | Brian Gix <brian.gix@intel.com> | 2019-12-13 12:15:05 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-12-16 08:18:20 -0800 |
commit | 9955657fa222ba892c52daff910044dca019dadb (patch) | |
tree | 695dc54afbdaba83f94e0979ad47992b6671d2b3 /mesh/mesh-io.c | |
parent | 3ed6e9f90c301536c332b52946347d6b70fb8d3c (diff) | |
download | bluez-9955657fa222ba892c52daff910044dca019dadb.tar.gz |
mesh: Refactor Secure Network Beaconing
The daemon handles multiple nodes, that may or may not be on the same
mesh network. While each node my be seperately configured to beacon or
not beacon, there is nothing gained (except redundent traffic) for each
node to beacon seperately. Beaconing is therefore centralized with the
Network Key the SNB represents, with each *received* beacon delivered
to each node. But for SNBs generated, we keep a count of how many nodes
want beacons sent for a specific key. If 1 or more, we beacon, if 0
nodes want the beacon sent, then we do not beacon.
Diffstat (limited to 'mesh/mesh-io.c')
-rw-r--r-- | mesh/mesh-io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesh/mesh-io.c b/mesh/mesh-io.c index 95a99b6a5..1ab173d9c 100644 --- a/mesh/mesh-io.c +++ b/mesh/mesh-io.c @@ -171,6 +171,9 @@ bool mesh_io_send(struct mesh_io *io, struct mesh_io_send_info *info, { io = l_queue_find(io_list, match_by_io, io); + if (!io) + io = l_queue_peek_head(io_list); + if (io && io->api && io->api->send) return io->api->send(io, info, data, len); |