From cd4ba385dff828417b7c8d8ef3273b91f5c3467a Mon Sep 17 00:00:00 2001 From: C-o-r-E Date: Wed, 23 Jan 2013 21:11:41 -0500 Subject: [PATCH] mfreerdp-server: rdpsnd fixes (init works) --- server/Mac/mf_peer.c | 31 ++++++++++++++++--------------- server/Mac/mf_rdpsnd.c | 1 + 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/server/Mac/mf_peer.c b/server/Mac/mf_peer.c index 5ff37d740..a70ff46a7 100644 --- a/server/Mac/mf_peer.c +++ b/server/Mac/mf_peer.c @@ -30,6 +30,7 @@ #include "mf_peer.h" #include "mf_info.h" #include "mf_event.h" +#include "mf_rdpsnd.h" #include #include @@ -197,9 +198,9 @@ void mf_peer_context_new(freerdp_peer* client, mfPeerContext* context) context->s = stream_new(0xFFFF); -#ifdef WITH_SERVER_CHANNELS +//#ifdef WITH_SERVER_CHANNELS context->vcm = WTSCreateVirtualChannelManager(client); -#endif +//#endif mf_info_peer_register(context->info, context); } @@ -224,14 +225,14 @@ void mf_peer_context_free(freerdp_peer* client, mfPeerContext* context) audin_server_context_free(context->audin); #endif -#ifdef CHANNEL_RDPSND_SERVER +//#ifdef CHANNEL_RDPSND_SERVER if (context->rdpsnd) rdpsnd_server_context_free(context->rdpsnd); -#endif +//#endif -#ifdef WITH_SERVER_CHANNELS +//#ifdef WITH_SERVER_CHANNELS WTSDestroyVirtualChannelManager(context->vcm); -#endif +//#endif } } @@ -264,7 +265,7 @@ void mf_peer_init(freerdp_peer* client) BOOL mf_peer_post_connect(freerdp_peer* client) { - //mfPeerContext* context = (mfPeerContext*) client->context; + mfPeerContext* context = (mfPeerContext*) client->context; rdpSettings* settings = client->settings; printf("Client %s is activated\n", client->hostname); @@ -302,24 +303,24 @@ BOOL mf_peer_post_connect(freerdp_peer* client) /*printf("Client requested desktop: %dx%dx%d\n", client->settings->DesktopWidth, client->settings->DesktopHeight, client->settings->ColorDepth); */ -#ifdef WITH_SERVER_CHANNELS +//#ifdef WITH_SERVER_CHANNELS /* Iterate all channel names requested by the client and activate those supported by the server */ int i; for (i = 0; i < client->settings->ChannelCount; i++) { if (client->settings->ChannelDefArray[i].joined) { -#ifdef CHANNEL_RDPSND_SERVER +//#ifdef CHANNEL_RDPSND_SERVER if (strncmp(client->settings->ChannelDefArray[i].Name, "rdpsnd", 6) == 0) { mf_peer_rdpsnd_init(context); /* Audio Output */ } -#endif +//#endif } } /* Dynamic Virtual Channels */ -#endif +//#endif #ifdef CHANNEL_AUDIN_SERVER mf_peer_audin_init(context); /* Audio Input */ @@ -545,9 +546,9 @@ void* mf_peer_main_loop(void* arg) break; } -#ifdef WITH_SERVER_CHANNELS +//#ifdef WITH_SERVER_CHANNELS WTSVirtualChannelManagerGetFileDescriptor(context->vcm, rfds, &rcount); -#endif +//#endif max_fds = 0; FD_ZERO(&rfds_set); @@ -590,10 +591,10 @@ void* mf_peer_main_loop(void* arg) } -#ifdef WITH_SERVER_CHANNELS +//#ifdef WITH_SERVER_CHANNELS if (WTSVirtualChannelManagerCheckFileDescriptor(context->vcm) != TRUE) break; -#endif +//#endif } diff --git a/server/Mac/mf_rdpsnd.c b/server/Mac/mf_rdpsnd.c index a125771e2..d5bb04997 100644 --- a/server/Mac/mf_rdpsnd.c +++ b/server/Mac/mf_rdpsnd.c @@ -46,6 +46,7 @@ static void mf_peer_rdpsnd_activated(rdpsnd_server_context* context) BOOL mf_peer_rdpsnd_init(mfPeerContext* context) { + printf("RDPSND INIT\n"); context->rdpsnd = rdpsnd_server_context_new(context->vcm); context->rdpsnd->data = context;