Skip to content
Snippets Groups Projects
Commit e4d89590 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

config-static-nodes: skip devices without WP_PROXY_FEATURE_INFO

parent d3df321e
No related branches found
No related tags found
No related merge requests found
......@@ -82,12 +82,20 @@ static void
on_device_added (WpObjectManager *om, WpProxy *proxy, gpointer p)
{
WpConfigStaticNodesContext *self = p;
g_autoptr (WpProperties) dev_props = wp_proxy_get_properties (proxy);
g_autoptr (WpProperties) dev_props = NULL;
g_autoptr (WpCore) core = g_weak_ref_get (&self->core);
g_autoptr (WpConfiguration) config = wp_configuration_get_instance (core);
g_autoptr (WpConfigParser) parser = NULL;
const struct WpParserNodeData *node_data = NULL;
/* Skip devices without info feature */
if ((wp_proxy_get_features(proxy) & WP_PROXY_FEATURE_INFO) == 0)
return;
/* Get the device properties */
dev_props = wp_proxy_get_properties (proxy);
g_return_if_fail (dev_props);
/* Get the parser node data and skip the node if not found */
parser = wp_configuration_get_parser (config, WP_PARSER_NODE_EXTENSION);
node_data = wp_config_parser_get_matched_data (parser, dev_props);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment