[pulseaudio-discuss] [PATCH 4/8] srbchannel: pa_srbchannel_new() may fail
David Henningsson
david.henningsson at canonical.com
Sat Aug 16 22:51:16 PDT 2014
On 2014-08-13 10:15, Peter Meerwald wrote:
> return from setup_srbchannel() when pa_srbchannel_new() fails
>
> pa_srbchannel_new() depends on HAVE_SYS_EVENTFD_H, e.g. Debian/kFreeBSD doesn't
> have it
>
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> Cc: David Henningsson <david.henningsson at canonical.com>
Looks good. Do we also need the same on the client side, in
handle_srbchannel_memblock in src/pulse/context.c ?
Acked-by: David Henningsson <david.henningsson at canonical.com>
> ---
> src/pulsecore/protocol-native.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
> index 5f2c35d..93db157 100644
> --- a/src/pulsecore/protocol-native.c
> +++ b/src/pulsecore/protocol-native.c
> @@ -2612,8 +2612,12 @@ static void setup_srbchannel(pa_native_connection *c) {
> return;
> }
>
> - pa_log_debug("Enabling srbchannel...");
> srb = pa_srbchannel_new(c->protocol->core->mainloop, c->protocol->core->rw_mempool);
> + if (!srb) {
> + pa_log_debug("Failed to create srbchannel");
> + return;
> + }
> + pa_log_debug("Enabling srbchannel...");
> pa_srbchannel_export(srb, &srbt);
>
> /* Send enable command to client */
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list