mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
context: avoid adding duplicate export types
This commit is contained in:
parent
8d0913c9d8
commit
702976ab9c
1 changed files with 4 additions and 0 deletions
|
|
@ -1021,6 +1021,10 @@ struct spa_handle *pw_context_load_spa_handle(struct pw_context *context,
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
int pw_context_register_export_type(struct pw_context *context, struct pw_export_type *type)
|
int pw_context_register_export_type(struct pw_context *context, struct pw_export_type *type)
|
||||||
{
|
{
|
||||||
|
if (pw_context_find_export_type(context, type->type)) {
|
||||||
|
pw_log_warn("context %p: duplicate export type %s", context, type->type);
|
||||||
|
return -EEXIST;
|
||||||
|
}
|
||||||
pw_log_debug("context %p: Add export type %s to context", context, type->type);
|
pw_log_debug("context %p: Add export type %s to context", context, type->type);
|
||||||
spa_list_append(&context->export_list, &type->link);
|
spa_list_append(&context->export_list, &type->link);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue