[pulseaudio-discuss] [PATCH 8/8] core: Add missing return on protocol error
Peter Meerwald
pmeerw at pmeerw.net
Mon Sep 14 09:07:49 PDT 2015
From: Peter Meerwald <p.meerwald at bct-electronic.com>
CID 1323582
when a protocol error occors, better bail out :)
---
src/pulsecore/protocol-native.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index ec223be..145db04 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2639,8 +2639,10 @@ static void setup_srbchannel(pa_native_connection *c) {
static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
- if (tag != (uint32_t) (size_t) c->srbpending)
+ if (tag != (uint32_t) (size_t) c->srbpending) {
protocol_error(c);
+ return;
+ }
pa_log_debug("Client enabled srbchannel.");
pa_pstream_set_srbchannel(c->pstream, c->srbpending);
--
1.7.9.5
More information about the pulseaudio-discuss
mailing list