[pulseaudio-commits] r1990 - /trunk/src/modules/module-zeroconf-publish.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon Oct 29 16:54:47 PDT 2007
Author: lennart
Date: Tue Oct 30 00:54:46 2007
New Revision: 1990
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1990&root=pulseaudio&view=rev
Log:
don't announce monitor sources
Modified:
trunk/src/modules/module-zeroconf-publish.c
Modified: trunk/src/modules/module-zeroconf-publish.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-zeroconf-publish.c?rev=1990&root=pulseaudio&r1=1989&r2=1990&view=diff
==============================================================================
--- trunk/src/modules/module-zeroconf-publish.c (original)
+++ trunk/src/modules/module-zeroconf-publish.c Tue Oct 30 00:54:46 2007
@@ -335,14 +335,14 @@
pa_xfree(s);
}
-static pa_bool_t is_network(pa_object *o) {
+static pa_bool_t shall_ignore(pa_object *o) {
pa_object_assert_ref(o);
if (pa_sink_isinstance(o))
return !!(PA_SINK(o)->flags & PA_SINK_NETWORK);
if (pa_source_isinstance(o))
- return !!(PA_SOURCE(o)->flags & PA_SOURCE_NETWORK);
+ return PA_SOURCE(o)->monitor_of || (PA_SOURCE(o)->flags & PA_SOURCE_NETWORK);
pa_assert_not_reached();
}
@@ -351,7 +351,7 @@
pa_assert(c);
pa_object_assert_ref(o);
- if (!is_network(o))
+ if (!shall_ignore(o))
publish_service(get_service(u, o));
return PA_HOOK_OK;
@@ -462,11 +462,11 @@
pa_log_debug("Publishing services in Zeroconf");
for (sink = PA_SINK(pa_idxset_first(u->core->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(u->core->sinks, &idx)))
- if (!is_network(PA_OBJECT(sink)))
+ if (!shall_ignore(PA_OBJECT(sink)))
publish_service(get_service(u, PA_OBJECT(sink)));
for (source = PA_SOURCE(pa_idxset_first(u->core->sources, &idx)); source; source = PA_SOURCE(pa_idxset_next(u->core->sources, &idx)))
- if (!is_network(PA_OBJECT(source)))
+ if (!shall_ignore(PA_OBJECT(source)))
publish_service(get_service(u, PA_OBJECT(source)));
if (publish_main_service(u) < 0)
More information about the pulseaudio-commits
mailing list