diff --git a/src/modules/module-protocol-native/connection.c b/src/modules/module-protocol-native/connection.c index 881669735..817e5b56a 100644 --- a/src/modules/module-protocol-native/connection.c +++ b/src/modules/module-protocol-native/connection.c @@ -158,6 +158,7 @@ static bool refill_buffer(struct pw_protocol_native_connection *conn, struct buf buf->buffer_size += len; /* handle control messages */ + buf->n_fds = 0; for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) continue; diff --git a/src/pipewire/proxy.c b/src/pipewire/proxy.c index d7c91e2b9..4a87b07be 100644 --- a/src/pipewire/proxy.c +++ b/src/pipewire/proxy.c @@ -121,7 +121,7 @@ void pw_proxy_destroy(struct pw_proxy *proxy) pw_log_debug("proxy %p: destroy %u", proxy, proxy->id); spa_hook_list_call(&proxy->listener_list, struct pw_proxy_events, destroy); - pw_map_remove(&proxy->remote->objects, proxy->id); + pw_map_insert_at(&proxy->remote->objects, proxy->id, NULL); spa_list_remove(&proxy->link); free(impl); diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c index 8f46bc692..7d65ce514 100644 --- a/src/pipewire/remote.c +++ b/src/pipewire/remote.c @@ -189,6 +189,7 @@ static void core_event_remove_id(void *data, uint32_t id) pw_log_debug("remote %p: object remove %u", this, id); pw_proxy_destroy(proxy); } + pw_map_remove(&this->objects, id); } static void diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index c63d213fd..da95dad2a 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -642,6 +642,8 @@ static int handle_connect(struct pw_stream *stream) { struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); + pw_log_debug("stream %p: creating proxy", stream); + impl->node = pw_node_new(impl->core, "export-source", pw_properties_copy(stream->properties), 0); impl->impl_node = impl_node; @@ -857,6 +859,7 @@ pw_stream_connect(struct pw_stream *stream, struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); int res; + pw_log_debug("stream %p: connect", stream); impl->direction = direction == PW_DIRECTION_INPUT ? SPA_DIRECTION_INPUT : SPA_DIRECTION_OUTPUT; impl->flags = flags; @@ -890,6 +893,7 @@ int pw_stream_disconnect(struct pw_stream *stream) { struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); + pw_log_debug("stream %p: disconnect", stream); impl->disconnecting = true; if (impl->node) {