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,10 +22,13 @@ function rescan ()
handleLinkable(si_ep)
end
for filter in streams_om:iterate {
Constraint { "node.link-group", "+" },
} do
handleFilter(filter)
-- handle filters only if we have endpoints
if endpoints_om:get_n_objects () > 0 then
for filter in streams_om:iterate {
Constraint { "node.link-group", "+" },
} do
handleFilter(filter)
end
end
end