summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@debian.org>2008-01-04 14:59:09 +0000
committerSjoerd Simons <sjoerd@debian.org>2008-01-04 14:59:09 +0000
commitc5678ae4000b8ea29e59dd3d51a90c847aa9d636 (patch)
tree720d39b6b214125da5ea7cd42dcc3910118794a0
parent02f49a24f4eaa97a68874a3116a136202a4605b8 (diff)
Don't send opcodes introduced in protocol versions 12 to clients using protocol
version 11. (fixes #183) git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2097 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/protocol-native.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 46405f10..4f582798 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -1069,6 +1069,9 @@ static void sink_input_suspend_cb(pa_sink_input *i, pa_bool_t suspend) {
s = PLAYBACK_STREAM(i->userdata);
playback_stream_assert_ref(s);
+ if (s->connection->version < 12)
+ return;
+
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_STREAM_SUSPENDED);
pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
@@ -1086,6 +1089,9 @@ static void sink_input_moved_cb(pa_sink_input *i) {
s = PLAYBACK_STREAM(i->userdata);
playback_stream_assert_ref(s);
+ if (s->connection->version < 12)
+ return;
+
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_STREAM_MOVED);
pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
@@ -1142,6 +1148,9 @@ static void source_output_suspend_cb(pa_source_output *o, pa_bool_t suspend) {
s = RECORD_STREAM(o->userdata);
record_stream_assert_ref(s);
+ if (s->connection->version < 12)
+ return;
+
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_RECORD_STREAM_SUSPENDED);
pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
@@ -1159,6 +1168,9 @@ static void source_output_moved_cb(pa_source_output *o) {
s = RECORD_STREAM(o->userdata);
record_stream_assert_ref(s);
+ if (s->connection->version < 12)
+ return;
+
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_RECORD_STREAM_MOVED);
pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */