From 6a069310ac7270e67c58dd13674c4a13860356a0 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 14 Aug 2007 19:59:40 +0000 Subject: Reset sink->c before calling get_config to avoid EBUSY --- audio/sink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/sink.c b/audio/sink.c index 4bf17e01..f7052fb6 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -140,6 +140,8 @@ void stream_state_changed(struct avdtp_stream *stream, avdtp_state_t old_state, sink->state = new_state; if (c) { + sink->c = NULL; + if (c->msg) { reply = dbus_message_new_method_return(c->msg); send_message_and_unref(dev->conn, reply); @@ -159,7 +161,6 @@ void stream_state_changed(struct avdtp_stream *stream, avdtp_state_t old_state, } pending_connect_free(c); - sink->c = NULL; } return; -- cgit