summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-15 18:15:00 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-15 18:15:00 +0000
commit1c3bfc44dcbd760687ea841d893c35db510804af (patch)
tree843a738cc4983296a1aa09cce22aca439b028188 /src/modules
parent6c39af7ad368743463540e85982c63b9d351e7a2 (diff)
use the description field of sinks/sources to name the zeroconf services, instead of the logical name
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1257 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-zeroconf-publish.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index 24e324f8..651a95b7 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -240,7 +240,7 @@ finish:
return r;
}
-static struct service *get_service(struct userdata *u, const char *name) {
+static struct service *get_service(struct userdata *u, const char *name, const char *description) {
struct service *s;
char hn[64];
@@ -253,7 +253,7 @@ static struct service *get_service(struct userdata *u, const char *name) {
s->published = UNPUBLISHED;
s->name = pa_xstrdup(name);
s->loaded.valid = s->autoload.valid = 0;
- s->service_name = pa_sprintf_malloc("%s on %s", s->name, pa_get_host_name(hn, sizeof(hn)));
+ s->service_name = pa_sprintf_malloc("%s on %s", description ? description : s->name, pa_get_host_name(hn, sizeof(hn)));
pa_hashmap_put(u->services, s->name, s);
@@ -265,7 +265,7 @@ static int publish_sink(struct userdata *u, pa_sink *s) {
int ret;
assert(u && s);
- svc = get_service(u, s->name);
+ svc = get_service(u, s->name, s->description);
if (svc->loaded.valid)
return publish_service(u, svc);
@@ -286,7 +286,7 @@ static int publish_source(struct userdata *u, pa_source *s) {
assert(u && s);
- svc = get_service(u, s->name);
+ svc = get_service(u, s->name, s->description);
if (svc->loaded.valid)
return publish_service(u, svc);
@@ -309,7 +309,7 @@ static int publish_autoload(struct userdata *u, pa_autoload_entry *s) {
assert(u && s);
- svc = get_service(u, s->name);
+ svc = get_service(u, s->name, NULL);
if (svc->autoload.valid)
return publish_service(u, svc);