summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-09-06 11:45:24 +0100
committerColin Guthrie <colin@mageia.org>2011-09-09 19:51:02 +0100
commit27343ed79a98e971c285b546ebb85495a334895b (patch)
tree7f04963338ed64da30d3a3a8e9254472afb5c1f6
parent3542112888c0dd563eda37a8be498dd5883fcb0e (diff)
raop: Properly deal with the name coming from the device.
We need to properly quote our proplist arguments passed to the module.
-rw-r--r--src/modules/raop/module-raop-discover.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/raop/module-raop-discover.c b/src/modules/raop/module-raop-discover.c
index 1a7572c1..4ebe5fc7 100644
--- a/src/modules/raop/module-raop-discover.c
+++ b/src/modules/raop/module-raop-discover.c
@@ -156,7 +156,9 @@ static void resolver_cb(
++nicename;
if (strlen(nicename) > 0) {
pa_log_debug("Found RAOP: %s", nicename);
- }
+ nicename = pa_escape(nicename, "\"'");
+ } else
+ nicename = NULL;
}
for (l = txt; l; l = l->next) {
@@ -189,11 +191,11 @@ static void resolver_cb(
if (nicename) {
args = pa_sprintf_malloc("server=[%s]:%u "
"sink_name=%s "
- "sink_properties=device.description=\"%s\"",
+ "sink_properties='device.description=\"%s\"'",
avahi_address_snprint(at, sizeof(at), a), port,
vname,
nicename);
-
+ pa_xfree(nicename);
} else {
args = pa_sprintf_malloc("server=[%s]:%u "
"sink_name=%s",