From c4997fc46d4846e3d11eb7e1b9374614348c6666 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 20 Feb 2022 01:20:29 +0200 Subject: [PATCH] pipewire-pulse: moving DONT_MOVE streams should fail Pulseaudio return EINVAL for attempts to move DONT_MOVE streams. --- src/modules/module-protocol-pulse/pulse-server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 27b13655d..182c3db99 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -4610,6 +4610,7 @@ static int do_move_stream(struct client *client, uint32_t command, uint32_t tag, uint32_t index, index_device; int target_id; const char *name_device; + struct pw_node_info *info; struct selector sel; int res; bool sink = command == COMMAND_MOVE_SINK_INPUT; @@ -4636,6 +4637,12 @@ static int do_move_stream(struct client *client, uint32_t command, uint32_t tag, if (o == NULL) return -ENOENT; + info = o->info; + if (info == NULL || info->props == NULL) + return -EINVAL; + if (spa_atob(spa_dict_lookup(info->props, PW_KEY_NODE_DONT_RECONNECT))) + return -EINVAL; + if ((dev = find_device(client, index_device, name_device, sink, NULL)) == NULL) return -ENOENT;