]> mj.ucw.cz Git - ursary.git/commitdiff
Pulse: Better error reporting
authorMartin Mares <mj@ucw.cz>
Sun, 20 Feb 2022 00:07:32 +0000 (01:07 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 20 Feb 2022 00:07:32 +0000 (01:07 +0100)
pulse.c

diff --git a/pulse.c b/pulse.c
index f16d0abf6b769cb5d4493e53efed89052c8d463f..5e9aa88480e1942098f4f92f226349ce08b44834 100644 (file)
--- a/pulse.c
+++ b/pulse.c
@@ -75,10 +75,10 @@ static void pulse_op_cancel_all(void)
 #define PULSE_ASYNC_RUN(name, ...) do { struct pulse_op *_op = pulse_op_new(); _op->o = name(pulse_ctx, __VA_ARGS__, _op); } while (0)
 #define PULSE_ASYNC_INIT_RUN(name, ...) do { struct pulse_op *_op = pulse_op_new(); _op->is_init = 1; _op->o = name(pulse_ctx, __VA_ARGS__, _op); } while (0)
 
-static void pulse_success_cb(pa_context *ctx UNUSED, int success, void *userdata)
+static void pulse_success_cb(pa_context *ctx, int success, void *userdata)
 {
   if (!success)
-    msg(L_ERROR, "Pulse: Failure reported");
+    msg(L_ERROR, "Pulse: Failure reported: %s", pa_strerror(pa_context_errno(ctx)));
   pulse_op_done(userdata);
 }