[pulseaudio-discuss] [PATCH 4/4] context: Handle client-side failure of pa_srbchannel_new_from_template()
Peter Meerwald
pmeerw at pmeerw.net
Mon Aug 18 08:15:45 PDT 2014
From: Peter Meerwald <p.meerwald at bct-electronic.com>
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
Cc: David Henningsson <david.henningsson at canonical.com>
---
src/pulse/context.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pulse/context.c b/src/pulse/context.c
index b8ebced..ff94543 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -360,6 +360,10 @@ static void handle_srbchannel_memblock(pa_context *c, pa_memblock *memblock) {
c->srb_template.memblock = memblock;
pa_memblock_ref(memblock);
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 */
t = pa_tagstruct_new(NULL, 0);
--
1.7.9.5
More information about the pulseaudio-discuss
mailing list