srbchannel: pa_srbchannel_new() may fail

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@pmeerw.net>
Acked-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
Peter Meerwald 2014-08-12 23:33:12 +02:00 committed by Peter Meerwald
parent 7974a17d1d
commit fd19327327

View file

@ -2612,8 +2612,12 @@ static void setup_srbchannel(pa_native_connection *c) {
return; return;
} }
pa_log_debug("Enabling srbchannel...");
srb = pa_srbchannel_new(c->protocol->core->mainloop, c->protocol->core->rw_mempool); 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); pa_srbchannel_export(srb, &srbt);
/* Send enable command to client */ /* Send enable command to client */