policy-endpoint-device: handle filters only if we have endpoints

Otherwise the filters are handled both in policy-node and here
and everything is messed up

Fixes: #536
This commit is contained in:
George Kiagiadakis
2023-12-03 19:46:20 +02:00
parent 4cc387d81d
commit e193ae0efc

View File

@@ -22,11 +22,14 @@ function rescan ()
handleLinkable(si_ep) handleLinkable(si_ep)
end end
-- handle filters only if we have endpoints
if endpoints_om:get_n_objects () > 0 then
for filter in streams_om:iterate { for filter in streams_om:iterate {
Constraint { "node.link-group", "+" }, Constraint { "node.link-group", "+" },
} do } do
handleFilter(filter) handleFilter(filter)
end end
end
end end
function scheduleRescan () function scheduleRescan ()