context: Handle client-side failure of pa_srbchannel_new_from_template()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
Peter Meerwald 2014-08-18 16:55:01 +02:00
parent fc0447ce88
commit 096c8903a9

View file

@ -365,6 +365,10 @@ static void handle_srbchannel_memblock(pa_context *c, pa_memblock *memblock) {
c->srb_template.memblock = memblock; c->srb_template.memblock = memblock;
pa_memblock_ref(memblock); pa_memblock_ref(memblock);
sr = pa_srbchannel_new_from_template(c->mainloop, &c->srb_template); sr = pa_srbchannel_new_from_template(c->mainloop, &c->srb_template);
if (!sr) {
pa_context_fail(c, PA_ERR_PROTOCOL);
return;
}
/* Ack the enable command */ /* Ack the enable command */
t = pa_tagstruct_new(NULL, 0); t = pa_tagstruct_new(NULL, 0);