GUAC-935: Add missing headers. Fix test for PubSub.

This commit is contained in:
Michael Jumper 2014-11-25 22:11:43 -08:00
parent 904fcfe75a
commit d85a18c24d
2 changed files with 14 additions and 6 deletions

View File

@ -491,10 +491,10 @@ fi
# Support for "PubSub" event system # Support for "PubSub" event system
if test "x${have_freerdp}" = "xyes" if test "x${have_freerdp}" = "xyes"
then then
AC_CHECK_MEMBERS([rdpContext.pubSub], AC_CHECK_DECL([PubSub_SubscribeChannelConnected],
[AC_DEFINE([HAVE_FREERDP_PUBSUB],, [AC_DEFINE([HAVE_FREERDP_EVENT_PUBSUB],,
[Whether this version of FreeRDP provides the PubSub event system])],, [Whether this version of FreeRDP provides the PubSub event system])],,
[[#include <freerdp/freerdp.h>]]) [#include <freerdp/event.h>])
fi fi
# Addin registration variations # Addin registration variations

View File

@ -57,6 +57,14 @@
#include "compat/client-cliprdr.h" #include "compat/client-cliprdr.h"
#endif #endif
#ifdef HAVE_FREERDP_CLIENT_DISP_H
#include <freerdp/client/disp.h>
#endif
#ifdef HAVE_FREERDP_EVENT_PUBSUB
#include <freerdp/event.h>
#endif
#ifdef ENABLE_WINPR #ifdef ENABLE_WINPR
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#else #else
@ -146,7 +154,7 @@ int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, UINT8* data, i
return freerdp_channels_data(rdp_inst, channelId, data, size, flags, total_size); return freerdp_channels_data(rdp_inst, channelId, data, size, flags, total_size);
} }
#ifdef HAVE_FREERDP_PUBSUB #ifdef HAVE_FREERDP_EVENT_PUBSUB
/** /**
* Called whenever a channel connects. * Called whenever a channel connects.
*/ */
@ -204,7 +212,7 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
guac_client_log(client, GUAC_LOG_WARNING, guac_client_log(client, GUAC_LOG_WARNING,
"Failed to load drdynvc plugin."); "Failed to load drdynvc plugin.");
#ifdef HAVE_FREERDP_PUBSUB #ifdef HAVE_FREERDP_EVENT_PUBSUB
/* Subscribe to and handle channel connected events */ /* Subscribe to and handle channel connected events */
PubSub_SubscribeChannelConnected(context->pubSub, PubSub_SubscribeChannelConnected(context->pubSub,
(pChannelConnectedEventHandler) guac_rdp_channel_connected); (pChannelConnectedEventHandler) guac_rdp_channel_connected);