mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
jack: make 0 an invalid object type
So that we don't accidentally think uninitialized objects are ports.
This commit is contained in:
parent
e0bfdb9f46
commit
ee811307cd
1 changed files with 5 additions and 4 deletions
|
|
@ -126,9 +126,10 @@ struct object {
|
||||||
|
|
||||||
struct client *client;
|
struct client *client;
|
||||||
|
|
||||||
#define INTERFACE_Port 0
|
#define INTERFACE_Invalid 0
|
||||||
#define INTERFACE_Node 1
|
#define INTERFACE_Port 1
|
||||||
#define INTERFACE_Link 2
|
#define INTERFACE_Node 2
|
||||||
|
#define INTERFACE_Link 3
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
uint32_t serial;
|
uint32_t serial;
|
||||||
|
|
@ -506,7 +507,7 @@ static void recycle_objects(struct client *c, uint32_t remain)
|
||||||
pthread_mutex_lock(&globals.lock);
|
pthread_mutex_lock(&globals.lock);
|
||||||
spa_list_for_each_safe(o, t, &c->context.objects, link) {
|
spa_list_for_each_safe(o, t, &c->context.objects, link) {
|
||||||
if (o->removed) {
|
if (o->removed) {
|
||||||
pw_log_info("%p: recycle object:%p type:%d id:%u/%u",
|
pw_log_debug("%p: recycle object:%p type:%d id:%u/%u",
|
||||||
c, o, o->type, o->id, o->serial);
|
c, o, o->type, o->id, o->serial);
|
||||||
spa_list_remove(&o->link);
|
spa_list_remove(&o->link);
|
||||||
memset(o, 0, sizeof(struct object));
|
memset(o, 0, sizeof(struct object));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue