mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
proxy: remove unncessary link in remote
This commit is contained in:
parent
e3d19993e9
commit
449d98910b
3 changed files with 8 additions and 11 deletions
|
|
@ -652,7 +652,6 @@ struct pw_proxy {
|
|||
struct spa_interface impl; /**< object implementation */
|
||||
|
||||
struct pw_remote *remote; /**< the owner remote of this proxy */
|
||||
struct spa_list link; /**< link in the remote */
|
||||
|
||||
uint32_t id; /**< client side id */
|
||||
unsigned int zombie:1; /**< proxy is removed locally and waiting to
|
||||
|
|
@ -683,9 +682,7 @@ struct pw_remote {
|
|||
* indexed with the client id */
|
||||
struct pw_client_proxy *client_proxy; /**< proxy for the client object */
|
||||
|
||||
struct spa_list proxy_list; /**< list of \ref pw_proxy objects */
|
||||
struct spa_list stream_list; /**< list of \ref pw_stream objects */
|
||||
struct spa_list remote_node_list; /**< list of \ref pw_remote_node objects */
|
||||
|
||||
struct pw_protocol_client *conn; /**< the protocol client connection */
|
||||
int recv_seq; /**< last received sequence number */
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ struct pw_proxy *pw_proxy_new(struct pw_proxy *factory,
|
|||
this->marshal->version,
|
||||
this->marshal->method_marshal, this);
|
||||
|
||||
spa_list_append(&this->remote->proxy_list, &this->link);
|
||||
|
||||
pw_log_debug(NAME" %p: new %u %s remote %p, marshal %p",
|
||||
this, this->id,
|
||||
spa_debug_type_find_name(pw_type_info(), type),
|
||||
|
|
@ -164,8 +162,6 @@ void pw_proxy_destroy(struct pw_proxy *proxy)
|
|||
if (!proxy->zombie) {
|
||||
pw_log_debug(NAME" %p: destroy %u", proxy, proxy->id);
|
||||
pw_proxy_emit_destroy(proxy);
|
||||
|
||||
spa_list_remove(&proxy->link);
|
||||
}
|
||||
if (!proxy->removed) {
|
||||
/* if the server did not remove this proxy, remove ourselves
|
||||
|
|
|
|||
|
|
@ -214,7 +214,6 @@ struct pw_remote *pw_remote_new(struct pw_core *core,
|
|||
|
||||
pw_map_init(&this->objects, 64, 32);
|
||||
|
||||
spa_list_init(&this->proxy_list);
|
||||
spa_list_init(&this->stream_list);
|
||||
|
||||
spa_hook_list_init(&this->listener_list);
|
||||
|
|
@ -465,10 +464,16 @@ int pw_remote_steal_fd(struct pw_remote *remote)
|
|||
return fd;
|
||||
}
|
||||
|
||||
static int destroy_proxy(void *object, void *data)
|
||||
{
|
||||
if (object)
|
||||
pw_proxy_destroy(object);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
int pw_remote_disconnect(struct pw_remote *remote)
|
||||
{
|
||||
struct pw_proxy *proxy;
|
||||
struct pw_stream *stream, *s2;
|
||||
|
||||
pw_log_debug(NAME" %p: disconnect", remote);
|
||||
|
|
@ -482,8 +487,7 @@ int pw_remote_disconnect(struct pw_remote *remote)
|
|||
|
||||
pw_remote_update_state(remote, PW_REMOTE_STATE_UNCONNECTED, NULL);
|
||||
|
||||
spa_list_consume(proxy, &remote->proxy_list, link)
|
||||
pw_proxy_destroy(proxy);
|
||||
pw_map_for_each(&remote->objects, destroy_proxy, remote);
|
||||
|
||||
pw_map_reset(&remote->objects);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue