From 28df14859a1c489b16db0864f6e8bc4aa7ca9387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lebrun?= Date: Thu, 1 Feb 2024 13:35:30 +0100 Subject: [PATCH] pw-link: handle link proxy removal --- src/tools/pw-link.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/pw-link.c b/src/tools/pw-link.c index 78b1bfed0..852514154 100644 --- a/src/tools/pw-link.c +++ b/src/tools/pw-link.c @@ -115,6 +115,12 @@ static void link_proxy_destroy(void *data) link_event(tl, PW_LINK_STATE_ERROR, -EINVAL); } +static void link_proxy_removed(void *data) +{ + struct target_link *tl = data; + pw_proxy_destroy(tl->proxy); +} + static void link_proxy_error(void *data, int seq, int res, const char *message) { struct target_link *tl = data; @@ -124,6 +130,7 @@ static void link_proxy_error(void *data, int seq, int res, const char *message) static const struct pw_proxy_events link_proxy_events = { PW_VERSION_PROXY_EVENTS, .destroy = link_proxy_destroy, + .removed = link_proxy_removed, .error = link_proxy_error, };