From 4e3af9d122acee6936ce5cb504c42b7bdbc83306 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 21 Oct 2020 10:55:14 +0200 Subject: [PATCH] pulse-server: support @DEFAULT_*@ wildcard in names --- src/modules/module-protocol-pulse/pulse-server.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 24bfaf0cb..486034037 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1932,11 +1932,14 @@ static int do_stat(struct client *client, uint32_t command, uint32_t tag, struct static struct device *find_device_by_name(struct impl *impl, const char *name) { struct device *dev; - if (strcmp(name, impl->default_source.name) == 0) + if (strcmp(name, impl->default_source.name) == 0 || + strcmp(name, "@DEFAULT_SOURCE@") == 0) dev = &impl->default_source; - else if (strcmp(name, impl->default_sink.name) == 0) + else if (strcmp(name, impl->default_sink.name) == 0 || + strcmp(name, "@DEFAULT_SINK@") == 0) dev = &impl->default_sink; - else if (strcmp(name, impl->default_monitor.name) == 0) + else if (strcmp(name, impl->default_monitor.name) == 0 || + strcmp(name, "@DEFAULT_MONITOR@") == 0) dev = &impl->default_monitor; else dev = NULL;