summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-http.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-28 01:46:27 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-28 01:46:27 +0100
commita5401a50a67ebf1d86e979ee5556961b24a25400 (patch)
treefd5d1d48cf5810135dbc28f3f3f63519038b037a /src/pulsecore/protocol-http.c
parentfc3ff114186020637e1dfbe23ff01d00b0452ccf (diff)
store the default sink/source in proper pa_sink*/pa_source* pointers instead of a string
Diffstat (limited to 'src/pulsecore/protocol-http.c')
-rw-r--r--src/pulsecore/protocol-http.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c
index c89d48b6..5379a36c 100644
--- a/src/pulsecore/protocol-http.c
+++ b/src/pulsecore/protocol-http.c
@@ -156,6 +156,8 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
if (!strcmp(c->url, URL_ROOT)) {
char txt[256];
+ pa_sink *def_sink;
+ pa_source *def_source;
http_response(c, 200, "OK", "text/html");
pa_ioline_puts(c->line,
@@ -173,8 +175,12 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
PRINTF_FIELD("User Name:", pa_get_user_name(txt, sizeof(txt)));
PRINTF_FIELD("Host name:", pa_get_host_name(txt, sizeof(txt)));
PRINTF_FIELD("Default Sample Specification:", pa_sample_spec_snprint(txt, sizeof(txt), &c->protocol->core->default_sample_spec));
- PRINTF_FIELD("Default Sink:", pa_namereg_get_default_sink_name(c->protocol->core));
- PRINTF_FIELD("Default Source:", pa_namereg_get_default_source_name(c->protocol->core));
+
+ def_sink = pa_namereg_get_default_sink(c->protocol->core);
+ def_source = pa_namereg_get_default_source(c->protocol->core);
+
+ PRINTF_FIELD("Default Sink:", def_sink ? def_sink->name : "n/a");
+ PRINTF_FIELD("Default Source:", def_source ? def_source->name : "n/a");
pa_ioline_puts(c->line, "</table>");