pulse-server: set serial to invalid on parse error

This commit is contained in:
Wim Taymans 2022-01-19 16:57:17 +01:00
parent b3e7d2b72a
commit dec2b1b9a2

View file

@ -605,7 +605,9 @@ static void registry_event_global(void *data, uint32_t id,
return; return;
} }
str = props ? spa_dict_lookup(props, PW_KEY_OBJECT_SERIAL) : NULL; str = props ? spa_dict_lookup(props, PW_KEY_OBJECT_SERIAL) : NULL;
spa_atou64(str, &o->this.serial, 0); if (!spa_atou64(str, &o->this.serial, 0))
o->this.serial = SPA_ID_INVALID;
o->this.id = id; o->this.id = id;
o->this.permissions = permissions; o->this.permissions = permissions;
o->this.type = info->type; o->this.type = info->type;