char s[256];
const pa_mempool_stat *stat;
unsigned k;
+ const char *def_sink, *def_source;
static const char* const type_table[PA_MEMBLOCK_TYPE_MAX] = {
[PA_MEMBLOCK_POOL] = "POOL",
pa_strbuf_printf(buf, "Default sample spec: %s\n",
pa_sample_spec_snprint(s, sizeof(s), &c->default_sample_spec));
+ def_sink = pa_namereg_get_default_sink_name(c);
+ def_source = pa_namereg_get_default_source_name(c);
pa_strbuf_printf(buf, "Default sink name: %s\n"
"Default source name: %s\n",
- pa_namereg_get_default_sink_name(c),
- pa_namereg_get_default_source_name(c));
+ def_sink ? def_sink : "none",
+ def_source ? def_source : "none");
for (k = 0; k < PA_MEMBLOCK_TYPE_MAX; k++)
pa_strbuf_printf(buf,
pa_strbuf_printf(s, "%u module(s) loaded.\n", pa_idxset_size(c->modules));
- for (m = pa_idxset_first(c->modules, &idx); m; m = pa_idxset_next(c->modules, &idx))
- pa_strbuf_printf(s, " index: %u\n\tname: <%s>\n\targument: <%s>\n\tused: %i\n\tauto unload: %s\n", m->index, m->name, m->argument, m->n_used, m->auto_unload ? "yes" : "no");
+ for (m = pa_idxset_first(c->modules, &idx); m; m = pa_idxset_next(c->modules, &idx)) {
+ pa_strbuf_printf(s, " index: %u\n"
+ "\tname: <%s>\n"
+ "\targument: <%s>\n"
+ "\tused: %i\n"
+ "\tauto unload: %s\n",
+ m->index, m->name, m->argument ? m->argument : "", m->n_used,
+ m->auto_unload ? "yes" : "no");
+ }
return pa_strbuf_tostring_free(s);
}
e->type == PA_NAMEREG_SOURCE ? "source" : "sink",
e->index,
e->module,
- e->argument);
+ e->argument ? e->argument : "");
}
}