From: kubistika Date: Tue, 6 Aug 2019 08:49:04 +0000 (+0300) Subject: server: proxy: client: before loading client addins, wait for serve's dynvc to be... X-Git-Tag: 2.0.0~392 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddb811cbc8dc5076de5bf767c13d0df9d9f3163f;p=platform%2Fupstream%2Ffreerdp.git server: proxy: client: before loading client addins, wait for serve's dynvc to be in ready state --- diff --git a/server/proxy/pf_client.c b/server/proxy/pf_client.c index 9986764..a83f89e 100644 --- a/server/proxy/pf_client.c +++ b/server/proxy/pf_client.c @@ -90,6 +90,8 @@ static void pf_OnErrorInfo(void* ctx, ErrorInfoEventArgs* e) */ static BOOL pf_client_pre_connect(freerdp* instance) { + pClientContext* pc = (pClientContext*) instance->context; + pServerContext* ps = pc->pdata->ps; rdpSettings* settings = instance->settings; /* @@ -98,7 +100,6 @@ static BOOL pf_client_pre_connect(freerdp* instance) * GlyphCacheSupport must be explicitly set to GLYPH_SUPPORT_NONE. */ settings->GlyphSupportLevel = GLYPH_SUPPORT_NONE; - settings->OsMajorType = OSMAJORTYPE_UNIX; settings->OsMinorType = OSMINORTYPE_NATIVE_XSERVER; /** @@ -119,6 +120,11 @@ static BOOL pf_client_pre_connect(freerdp* instance) PubSub_SubscribeChannelDisconnected(instance->context->pubSub, pf_OnChannelDisconnectedEventHandler); PubSub_SubscribeErrorInfo(instance->context->pubSub, pf_OnErrorInfo); + + /* before loading client's channels, make sure proxy's dynvc is ready */ + WLog_DBG(TAG, "pf_client_pre_connect(): Waiting for proxy's server dynvc to be ready"); + WaitForSingleObject(ps->dynvcReady, INFINITE); + /** * Load all required plugins / channels / libraries specified by current * settings. diff --git a/server/proxy/pf_rdpgfx.c b/server/proxy/pf_rdpgfx.c index de885d1..74d11e8 100644 --- a/server/proxy/pf_rdpgfx.c +++ b/server/proxy/pf_rdpgfx.c @@ -201,7 +201,6 @@ static UINT pf_rdpgfx_map_surface_to_scaled_output(RdpgfxClientContext* context, static UINT pf_rdpgfx_on_open(RdpgfxClientContext* context, BOOL* do_caps_advertise, BOOL* send_frame_acks) { - proxyData* pdata = (proxyData*) context->custom; WLog_VRB(TAG, __FUNCTION__); if (NULL != do_caps_advertise) @@ -210,10 +209,6 @@ static UINT pf_rdpgfx_on_open(RdpgfxClientContext* context, if (NULL != send_frame_acks) *send_frame_acks = FALSE; - /* Wait for the proxy's server's DYNVC to be in a ready state to safely open - * the GFX DYNVC. */ - WLog_DBG(TAG, "Waiting for proxy's server dynvc to be ready"); - WaitForSingleObject(pdata->ps->dynvcReady, INFINITE); return CHANNEL_RC_OK; }