Module: wine Branch: stable Commit: 327ac6c86a9ff242169f10affb2e6eb179fdcbc0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=327ac6c86a9ff242169f10affb...
Author: Andrew Eikum aeikum@codeweavers.com Date: Fri Mar 4 10:16:15 2016 -0600
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 aeikum@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 0766334d04d00f1de6d601a4b052f7dfedcd9c64) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
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 ef171d3..fcb27d86 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -566,6 +566,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));