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>
This commit is contained in:
Andrew Eikum 2016-03-04 10:16:15 -06:00 committed by Alexandre Julliard
parent 10deca7caa
commit 0766334d04
1 changed files with 3 additions and 0 deletions

View File

@ -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));