aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-30 21:56:57 +0200
committerMax Kellermann <max@duempel.org>2011-08-30 21:56:57 +0200
commit210b6c38bd945fd2d1a18c9e8f965b6dc6bc5ecb (patch)
tree818b74d8e30f3a48c8681d270c51c4e6f1916e50
parent9592c0b466d2c6c93656cdd5e5c4807e8e15d65a (diff)
downloadmpd-210b6c38bd945fd2d1a18c9e8f965b6dc6bc5ecb.tar.gz
mpd-210b6c38bd945fd2d1a18c9e8f965b6dc6bc5ecb.tar.xz
mpd-210b6c38bd945fd2d1a18c9e8f965b6dc6bc5ecb.zip
output/raop: move code to raop_output_remove()
Diffstat (limited to '')
-rw-r--r--src/output/raop_output_plugin.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c
index 7ff5b009a..5e4a9b4f7 100644
--- a/src/output/raop_output_plugin.c
+++ b/src/output/raop_output_plugin.c
@@ -737,11 +737,13 @@ raop_output_pause(void *data)
return true;
}
+/**
+ * Remove the output from the session's list. Caller must not lock
+ * the list_mutex.
+ */
static void
-raop_output_close(void *data)
+raop_output_remove(struct raop_data *rd)
{
- //teardown
- struct raop_data *rd = data;
struct raop_data *iter = raop_session->raop_list;
struct raop_data *prev = NULL;
@@ -771,6 +773,15 @@ raop_output_close(void *data)
iter = iter->next;
}
g_mutex_unlock(raop_session->list_mutex);
+}
+
+static void
+raop_output_close(void *data)
+{
+ //teardown
+ struct raop_data *rd = data;
+
+ raop_output_remove(rd);
g_mutex_lock(rd->control_mutex);
exec_request(rd->rtspcl, "TEARDOWN", NULL, NULL, 0,