#include "pf_update.h"
#include "pf_log.h"
#include "pf_modules.h"
+#include "pf_input.h"
#include "pf_capture.h"
#define TAG PROXY_TAG("client")
freerdp_send_error_info(ps->context.rdp);
}
+static void pf_client_on_activated(void* ctx, ActivatedEventArgs* e)
+{
+ pClientContext* pc = (pClientContext*)ctx;
+ pServerContext* ps = pc->pdata->ps;
+ freerdp_peer* peer = ps->context.peer;
+
+ LOG_INFO(TAG, pc, "client activated, registering server input callbacks");
+
+ /* Register server input/update callbacks only after proxy client is fully activated */
+ pf_server_register_input_callbacks(peer->input);
+ pf_server_register_update_callbacks(peer->update);
+}
+
static BOOL pf_client_load_rdpsnd(pClientContext* pc)
{
rdpContext* context = (rdpContext*)pc;
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
pf_channels_on_client_channel_disconnect);
PubSub_SubscribeErrorInfo(instance->context->pubSub, pf_client_on_error_info);
+ PubSub_SubscribeActivated(instance->context->pubSub, pf_client_on_activated);
/**
* Load all required plugins / channels / libraries specified by current
* settings.
if (!pf_capture_create_session_directory(pc))
{
LOG_ERR(TAG, pc, "pf_capture_create_session_directory failed!");
- return FALSE;
+ return FALSE;
}
LOG_ERR(TAG, pc, "frames dir created: %s", pc->frames_dir);