[pulseaudio-commits] r1637 - /branches/lennart/src/pulsecore/protocol-native.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sat Aug 11 09:08:20 PDT 2007
Author: lennart
Date: Sat Aug 11 18:08:20 2007
New Revision: 1637
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1637&root=3Dpulseaudio&vi=
ew=3Drev
Log:
deal with messages properly which are recieved after destruction of a stream
Modified:
branches/lennart/src/pulsecore/protocol-native.c
Modified: branches/lennart/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
protocol-native.c?rev=3D1637&root=3Dpulseaudio&r1=3D1636&r2=3D1637&view=3Dd=
iff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/protocol-native.c (original)
+++ branches/lennart/src/pulsecore/protocol-native.c Sat Aug 11 18:08:20 20=
07
@@ -407,6 +407,9 @@
record_stream *s =3D RECORD_STREAM(o);
record_stream_assert_ref(s);
=
+ if (!s->connection)
+ return -1;
+ =
switch (code) {
=
case RECORD_STREAM_MESSAGE_POST_DATA:
@@ -523,6 +526,9 @@
static int playback_stream_process_msg(pa_msgobject *o, int code, void*use=
rdata, int64_t offset, pa_memchunk *chunk) {
playback_stream *s =3D PLAYBACK_STREAM(o);
playback_stream_assert_ref(s);
+
+ if (!s->connection)
+ return -1;
=
switch (code) {
case PLAYBACK_STREAM_MESSAGE_REQUEST_DATA: {
@@ -689,6 +695,9 @@
connection *c =3D CONNECTION(o);
connection_assert_ref(c);
=
+ if (!c->protocol)
+ return -1;
+ =
switch (code) {
=
case CONNECTION_MESSAGE_REVOKE:
More information about the pulseaudio-commits
mailing list