tunnel-new: remove uncorking in thread_func. Now handled by state change callback.

tunnel-new handled a corked stream conditional in the thread_func to be
sure the stream isn't corked. Un/Corking is now handled in the
state change callback.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
Alexander Couzens 2013-11-25 19:44:14 +01:00 committed by Tanu Kaskinen
parent 5170df86b3
commit c187441ff9

View file

@ -181,11 +181,6 @@ static void thread_func(void *userdata) {
if (u->connected && if (u->connected &&
pa_stream_get_state(u->stream) == PA_STREAM_READY && pa_stream_get_state(u->stream) == PA_STREAM_READY &&
PA_SINK_IS_LINKED(u->sink->thread_info.state)) { PA_SINK_IS_LINKED(u->sink->thread_info.state)) {
/* TODO: Cork the stream when the sink is suspended. */
if (pa_stream_is_corked(u->stream)) {
cork_stream(u, false);
} else {
size_t writable; size_t writable;
writable = pa_stream_writable_size(u->stream); writable = pa_stream_writable_size(u->stream);
@ -213,7 +208,7 @@ static void thread_func(void *userdata) {
pa_log_error("Could not write data into the stream ... ret = %i", ret); pa_log_error("Could not write data into the stream ... ret = %i", ret);
u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP); u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
} }
}
} }
} }
} }