summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/gconf/module-gconf.c2
-rw-r--r--src/pulsecore/memtrap.c5
-rw-r--r--src/pulsecore/namereg.c13
3 files changed, 17 insertions, 3 deletions
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 85523b39..5f31d688 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -342,7 +342,7 @@ int pa__init(pa_module*m) {
if ((u->fd = pa_start_child_for_read(
#if defined(__linux__) && !defined(__OPTIMIZE__)
- pa_run_from_build_tree() ? PA_BUILDDIR "/.libs/gconf-helper" :
+ pa_run_from_build_tree() ? PA_BUILDDIR "/gconf-helper" :
#endif
PA_GCONF_HELPER, NULL, &u->pid)) < 0)
goto fail;
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index 373872c1..4fc18210 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -107,7 +107,10 @@ static void memtrap_link(pa_memtrap *m, unsigned j) {
pa_assert(m);
m->prev[j] = NULL;
- m->next[j] = memtraps[j];
+
+ if ((m->next[j] = memtraps[j]))
+ m->next[j]->prev[j] = m;
+
memtraps[j] = m;
}
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index 37755777..d9821876 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -98,7 +98,7 @@ char* pa_namereg_make_valid_name(const char *name) {
if (*name == 0)
return NULL;
- n = pa_xmalloc(strlen(name)+1);
+ n = pa_xnew(char, strlen(name)+1);
for (a = name, b = n; *a && (a-name < PA_NAME_MAX); a++, b++)
*b = (char) (is_valid_char(*a) ? *a : '_');
@@ -170,6 +170,17 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
pa_assert_se(pa_hashmap_put(c->namereg, e->name, e) >= 0);
+ /* If a sink or source is registered and there was none registered
+ * before we inform the clients which then can ask for the default
+ * sink/source which is then assigned. We don't adjust the default
+ * sink/source here right away to give the module the chance to
+ * register more sinks/sources before we choose a new default
+ * sink/source. */
+
+ if ((!c->default_sink && type == PA_NAMEREG_SINK) ||
+ (!c->default_source && type == PA_NAMEREG_SOURCE))
+ pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SERVER|PA_SUBSCRIPTION_EVENT_CHANGE, PA_INVALID_INDEX);
+
return e->name;
}