diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-08-05 14:06:47 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-08-05 14:06:47 +0000 |
commit | 67753869830914f6a25a11460405929741776b61 (patch) | |
tree | f6fdf80f8c0b2e2a7973e352fa189335d7b46653 | |
parent | 41d67c40d9603228f3bd1a748fa774e49ff50c3e (diff) |
make sure to handle disconnecting our own connection properly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1579 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/pulsecore/protocol-native.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 2396a38d..89849858 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -2298,6 +2298,8 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3 client = pa_idxset_get_by_index(c->protocol->core->clients, idx); CHECK_VALIDITY(c->pstream, client, tag, PA_ERR_NOENTITY); + + connection_ref(c); pa_client_kill(client); } else if (command == PA_COMMAND_KILL_SINK_INPUT) { @@ -2306,6 +2308,7 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3 s = pa_idxset_get_by_index(c->protocol->core->sink_inputs, idx); CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); + connection_ref(c); pa_sink_input_kill(s); } else { pa_source_output *s; @@ -2315,10 +2318,12 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3 s = pa_idxset_get_by_index(c->protocol->core->source_outputs, idx); CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); + connection_ref(c); pa_source_output_kill(s); } pa_pstream_send_simple_ack(c->pstream, tag); + connection_unref(c); } static void command_load_module(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) { |