deal with messages properly which are recieved after destruction of a stream

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1637 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-08-11 16:08:20 +00:00
parent 107b23d202
commit 447c4a5327

View file

@ -407,6 +407,9 @@ static int record_stream_process_msg(pa_msgobject *o, int code, void*userdata, i
record_stream *s = RECORD_STREAM(o); record_stream *s = RECORD_STREAM(o);
record_stream_assert_ref(s); record_stream_assert_ref(s);
if (!s->connection)
return -1;
switch (code) { switch (code) {
case RECORD_STREAM_MESSAGE_POST_DATA: case RECORD_STREAM_MESSAGE_POST_DATA:
@ -524,6 +527,9 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
playback_stream *s = PLAYBACK_STREAM(o); playback_stream *s = PLAYBACK_STREAM(o);
playback_stream_assert_ref(s); playback_stream_assert_ref(s);
if (!s->connection)
return -1;
switch (code) { switch (code) {
case PLAYBACK_STREAM_MESSAGE_REQUEST_DATA: { case PLAYBACK_STREAM_MESSAGE_REQUEST_DATA: {
pa_tagstruct *t; pa_tagstruct *t;
@ -689,6 +695,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
connection *c = CONNECTION(o); connection *c = CONNECTION(o);
connection_assert_ref(c); connection_assert_ref(c);
if (!c->protocol)
return -1;
switch (code) { switch (code) {
case CONNECTION_MESSAGE_REVOKE: case CONNECTION_MESSAGE_REVOKE: