aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-19 20:04:45 +0100
committerMax Kellermann <max@duempel.org>2012-03-19 20:37:25 +0100
commit48e3432a639e5d50b68014e03f2c995ce63d40e0 (patch)
tree21872dd7054b76dcda5acb107345cf7cee1e7b4e
parent69d3c611aae06924982ebb3cdcd0e11b8d250e2a (diff)
downloadmpd-48e3432a639e5d50b68014e03f2c995ce63d40e0.tar.gz
mpd-48e3432a639e5d50b68014e03f2c995ce63d40e0.tar.xz
mpd-48e3432a639e5d50b68014e03f2c995ce63d40e0.zip
test/run_input: use input_stream_*lock()
-rw-r--r--test/run_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/run_input.c b/test/run_input.c
index 0fe5a01f0..676e4e618 100644
--- a/test/run_input.c
+++ b/test/run_input.c
@@ -53,7 +53,7 @@ dump_input_stream(struct input_stream *is)
size_t num_read;
ssize_t num_written;
- g_mutex_lock(is->mutex);
+ input_stream_lock(is);
/* wait until the stream becomes ready */
@@ -62,7 +62,7 @@ dump_input_stream(struct input_stream *is)
if (!input_stream_check(is, &error)) {
g_warning("%s", error->message);
g_error_free(error);
- g_mutex_unlock(is->mutex);
+ input_stream_unlock(is);
return EXIT_FAILURE;
}
@@ -100,11 +100,11 @@ dump_input_stream(struct input_stream *is)
if (!input_stream_check(is, &error)) {
g_warning("%s", error->message);
g_error_free(error);
- g_mutex_unlock(is->mutex);
+ input_stream_unlock(is);
return EXIT_FAILURE;
}
- g_mutex_unlock(is->mutex);
+ input_stream_unlock(is);
return 0;
}