Commit 48e3432a authored by Max Kellermann's avatar Max Kellermann

test/run_input: use input_stream_*lock()

parent 69d3c611
...@@ -53,7 +53,7 @@ dump_input_stream(struct input_stream *is) ...@@ -53,7 +53,7 @@ dump_input_stream(struct input_stream *is)
size_t num_read; size_t num_read;
ssize_t num_written; ssize_t num_written;
g_mutex_lock(is->mutex); input_stream_lock(is);
/* wait until the stream becomes ready */ /* wait until the stream becomes ready */
...@@ -62,7 +62,7 @@ dump_input_stream(struct input_stream *is) ...@@ -62,7 +62,7 @@ dump_input_stream(struct input_stream *is)
if (!input_stream_check(is, &error)) { if (!input_stream_check(is, &error)) {
g_warning("%s", error->message); g_warning("%s", error->message);
g_error_free(error); g_error_free(error);
g_mutex_unlock(is->mutex); input_stream_unlock(is);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
...@@ -100,11 +100,11 @@ dump_input_stream(struct input_stream *is) ...@@ -100,11 +100,11 @@ dump_input_stream(struct input_stream *is)
if (!input_stream_check(is, &error)) { if (!input_stream_check(is, &error)) {
g_warning("%s", error->message); g_warning("%s", error->message);
g_error_free(error); g_error_free(error);
g_mutex_unlock(is->mutex); input_stream_unlock(is);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
g_mutex_unlock(is->mutex); input_stream_unlock(is);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment