[PATCH] winepulse.drv: Check that the server connection actually succeeded

Andrew Eikum aeikum at codeweavers.com
Fri Mar 4 10:16:15 CST 2016

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 at codeweavers.com>
 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 d57b822..1c38e58 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -573,6 +573,9 @@ static HRESULT pulse_test_connect(void)
+    if (pa_context_get_state(pulse_ctx) != PA_CONTEXT_READY)
+        goto fail;
     TRACE("Test-connected to server %s with protocol version: %i.\n",

More information about the wine-patches mailing list