Andrew Eikum : winepulse.drv: Check that the server connection actually succeeded.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 7 08:50:37 CST 2016
Module: wine
Branch: master
Commit: 0766334d04d00f1de6d601a4b052f7dfedcd9c64
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0766334d04d00f1de6d601a4b052f7dfedcd9c64
Author: Andrew Eikum <aeikum at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 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)
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));
More information about the wine-cvs
mailing list