assert(bus);
assert(path);
assert(c);
- assert(userdata);
u = c->userdata;
if (c->find) {
return r;
}
- *userdata = u;
+ if (userdata)
+ *userdata = u;
+
return 1;
}
assert(bus);
assert(n);
- if (n->child)
- return true;
+ /* Tests if there's anything attached directly to this node
+ * for the specified path */
LIST_FOREACH(callbacks, k, n->callbacks) {
if (require_fallback && !k->is_fallback)
if (require_fallback && !c->is_fallback)
continue;
- return true;
+ if (node_vtable_get_userdata(bus, path, c, NULL) > 0)
+ return true;
}
return !require_fallback && (n->enumerators || n->object_manager);
-
}
static int process_introspect(
empty = set_isempty(s);
LIST_FOREACH(vtables, c, n->vtables) {
- void *u;
-
if (require_fallback && !c->is_fallback)
continue;
- r = node_vtable_get_userdata(bus, m->path, c, &u);
+ r = node_vtable_get_userdata(bus, m->path, c, NULL);
if (r < 0)
return r;
if (r == 0)
struct node_vtable *c;
struct node *n;
char **property;
- void *u;
+ void *u = NULL;
int r;
assert(bus);