From 0fbc1eb45cc1a11191e5bdcee23119b40ce644f4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 13 Dec 2011 18:08:54 +0100 Subject: sink_(input)_info_cb: Use interface_set_status to display errors --- src/pa-sink-ctl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c index 7ee00eb..36ca388 100644 --- a/src/pa-sink-ctl.c +++ b/src/pa-sink-ctl.c @@ -61,8 +61,9 @@ sink_input_info_cb(pa_context *c, const pa_sink_input_info *i, if (is_last < 0) { if (pa_context_errno(c) == PA_ERR_NOENTITY) return; - g_printerr("Failed to get sink input information: %s\n", - pa_strerror(pa_context_errno(c))); + interface_set_status(ctx, + "Failed to get sink input info: %s\n", + pa_strerror(pa_context_errno(c))); return; } @@ -145,9 +146,10 @@ sink_info_cb(pa_context *c, const pa_sink_info *i, if (is_last < 0) { if (pa_context_errno(c) == PA_ERR_NOENTITY) return; - g_printerr("Failed to get sink information: %s\n", - pa_strerror(pa_context_errno(c))); - quit(ctx); + interface_set_status(ctx, + "Failed to get sink information: %s\n", + pa_strerror(pa_context_errno(c))); + return; } if (is_last) { -- cgit