From 0766334d04d00f1de6d601a4b052f7dfedcd9c64 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 4 Mar 2016 10:16:15 -0600 Subject: [PATCH] winepulse.drv: Check that the server connection actually succeeded. When there is no PA server running, some older PulseAudio versions have pa_mainloop_iterate fail instead of setting the connection state to failed. So, we should also check the connection state after exiting the loop to ensure it really succeeded before continuing. Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/winepulse.drv/mmdevdrv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index d57b8220aa0..1c38e582040 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -573,6 +573,9 @@ static HRESULT pulse_test_connect(void) break; } + if (pa_context_get_state(pulse_ctx) != PA_CONTEXT_READY) + goto fail; + TRACE("Test-connected to server %s with protocol version: %i.\n", pa_context_get_server(pulse_ctx), pa_context_get_server_protocol_version(pulse_ctx));