GUAC-849: Check for presence of AudioPlayback setting in FreeRDP settings struct.

This commit is contained in:
Michael Jumper 2014-10-04 20:25:53 -07:00
parent 5bcd60b3ba
commit b2ab26c727
2 changed files with 16 additions and 0 deletions

View File

@ -373,6 +373,7 @@ then
have_freerdp=yes have_freerdp=yes
legacy_freerdp_extensions=no legacy_freerdp_extensions=no
rdpsettings_interface=unknown rdpsettings_interface=unknown
rdpsettings_audioplayback=yes
rdpsettings_fastpath=yes rdpsettings_fastpath=yes
freerdp_interface=unknown freerdp_interface=unknown
event_interface=unknown event_interface=unknown
@ -602,6 +603,11 @@ then
[rdpsettings_fastpath=no], [rdpsettings_fastpath=no],
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
# Legacy interface may not have AudioPlayback settings
AC_CHECK_MEMBERS([rdpSettings.audio_playback],,
[rdpsettings_audioplayback=no],
[[#include <freerdp/freerdp.h>]])
elif test "x${rdpsettings_interface}" = "xunknown"; then elif test "x${rdpsettings_interface}" = "xunknown"; then
AC_MSG_WARN([ AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
@ -618,6 +624,12 @@ if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_fastpath}" = "xyes"; then
[Whether the rdpSettings structure has FastPath settings]) [Whether the rdpSettings structure has FastPath settings])
fi fi
# Activate audio playback settings if present
if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_audioplayback}" = "xyes"; then
AC_DEFINE([HAVE_RDPSETTINGS_AUDIOPLAYBACK],,
[Whether the rdpSettings structure has AudioPlayback settings])
fi
# Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX # Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX
if test "x${have_freerdp}" = "xyes" if test "x${have_freerdp}" = "xyes"
then then

View File

@ -109,9 +109,13 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
/* Audio */ /* Audio */
#ifdef LEGACY_RDPSETTINGS #ifdef LEGACY_RDPSETTINGS
#ifdef HAVE_RDPSETTINGS_AUDIOPLAYBACK
rdp_settings->audio_playback = guac_settings->audio_enabled; rdp_settings->audio_playback = guac_settings->audio_enabled;
#endif
#else #else
#ifdef HAVE_RDPSETTINGS_AUDIOPLAYBACK
rdp_settings->AudioPlayback = guac_settings->audio_enabled; rdp_settings->AudioPlayback = guac_settings->audio_enabled;
#endif
#endif #endif
/* Security */ /* Security */