policy-node: only configure devices when active

Wait until a node is active before we attempt to configure it or
else we don't yet have a format to configure it with.
This commit is contained in:
Wim Taymans 2020-07-29 12:20:24 +02:00
parent d2452e1340
commit 0d6bbaa7e1

View file

@ -516,13 +516,13 @@ static int rescan_node(struct impl *impl, struct node *n)
struct node *peer; struct node *peer;
struct sm_object *obj; struct sm_object *obj;
if (n->type == NODE_TYPE_DEVICE) { if (!n->active) {
configure_node(n, NULL); pw_log_debug(NAME " %p: node %d is not active", impl, n->id);
return 0; return 0;
} }
if (!n->active) { if (n->type == NODE_TYPE_DEVICE) {
pw_log_debug(NAME " %p: node %d is not active", impl, n->id); configure_node(n, NULL);
return 0; return 0;
} }