jack: mark object registered when emit is suppressed

When we don't manage to emit the notify, still mark the object as
registered. Otherwise we might not emit the unregistered
notify later on.

This usually happens when a client connects and the notifies are
suppressed for all the objects in the graph. When they later disappear
we do want to emit the unregistered notify.
This commit is contained in:
Wim Taymans 2023-08-30 18:23:07 +02:00
parent 89fab13c77
commit f404168739

View file

@ -1108,9 +1108,12 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1,
}
pw_log_debug("%p: skip notify %08x active:%d emit:%d", c, type,
c->active, emit);
if (o != NULL && arg1 == 0 && o->removing) {
o->removing = false;
free_object(c, o);
if (o != NULL) {
o->registered = arg1;
if (arg1 == 0 && o->removing) {
o->removing = false;
free_object(c, o);
}
}
return res;
}