pw-dump: mark objects without events as changed

Usually the event function marks the object as changed so when
there is no event function, mark the change immediately so that
we can dump it.
This commit is contained in:
Wim Taymans 2021-01-19 16:36:55 +01:00
parent 0e5ad1c0a4
commit f891324e25

View file

@ -88,7 +88,6 @@ struct class {
const char *type; const char *type;
uint32_t version; uint32_t version;
const void *events; const void *events;
void (*init) (struct object *object);
void (*destroy) (struct object *object); void (*destroy) (struct object *object);
void (*dump) (struct object *object); void (*dump) (struct object *object);
}; };
@ -1223,8 +1222,8 @@ static void registry_event_global(void *data, uint32_t id,
pw_proxy_add_object_listener(o->proxy, pw_proxy_add_object_listener(o->proxy,
&o->object_listener, &o->object_listener,
o->class->events, o); o->class->events, o);
if (o->class->init) else
o->class->init(o); o->changed++;
} else { } else {
o->changed++; o->changed++;
} }