mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-protocol-native: emit error on bad concurrency
Emit error if message construction is not holding appropriate locks or runs from wrong thread, so that the flush may be running concurrently. This generally causes corrputed messages to be sent silently, and can be fairly hard to debug otherwise in client applications.
This commit is contained in:
parent
b832a94f5d
commit
72c9fba6d2
1 changed files with 2 additions and 0 deletions
|
|
@ -1489,6 +1489,7 @@ static int impl_ext_end_proxy(struct pw_proxy *proxy,
|
|||
{
|
||||
struct pw_core *core = proxy->core;
|
||||
struct client *impl = SPA_CONTAINER_OF(core->conn, struct client, this);
|
||||
ensure_loop(impl->context->main_loop);
|
||||
assert_single_pod(builder);
|
||||
marshal_core_footers(&impl->footer_state, core, builder);
|
||||
return core->send_seq = pw_protocol_native_connection_end(impl->connection, builder);
|
||||
|
|
@ -1518,6 +1519,7 @@ static int impl_ext_end_resource(struct pw_resource *resource,
|
|||
{
|
||||
struct client_data *data = resource->client->user_data;
|
||||
struct pw_impl_client *client = resource->client;
|
||||
ensure_loop(client->context->main_loop);
|
||||
assert_single_pod(builder);
|
||||
marshal_client_footers(&data->footer_state, client, builder);
|
||||
return client->send_seq = pw_protocol_native_connection_end(data->connection, builder);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue