From: Martin Mares Date: Sun, 20 Feb 2022 00:07:32 +0000 (+0100) Subject: Pulse: Better error reporting X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=7c5d78aa492ae75cace0124fe94c0821ad0c697e;p=ursary.git Pulse: Better error reporting --- diff --git a/pulse.c b/pulse.c index f16d0ab..5e9aa88 100644 --- 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); }