Merge pull request #6360 from kubistika/proxy_rail_handshake_ex_flags_sync
server: proxy: rail: handshake ex flags sync
This commit is contained in:
commit
5667c12be5
@ -297,8 +297,6 @@ static UINT rail_send_server_handshake_ex(RailServerContext* context,
|
|||||||
if (!context || !handshakeEx || !context->priv)
|
if (!context || !handshakeEx || !context->priv)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* Save channel flags to context */
|
|
||||||
context->priv->channelFlags = handshakeEx->railHandshakeFlags;
|
|
||||||
s = rail_pdu_init(RAIL_HANDSHAKE_EX_ORDER_LENGTH);
|
s = rail_pdu_init(RAIL_HANDSHAKE_EX_ORDER_LENGTH);
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
@ -307,6 +305,8 @@ static UINT rail_send_server_handshake_ex(RailServerContext* context,
|
|||||||
return CHANNEL_RC_NO_MEMORY;
|
return CHANNEL_RC_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rail_server_set_handshake_ex_flags(context, handshakeEx->railHandshakeFlags);
|
||||||
|
|
||||||
rail_write_handshake_ex_order(s, handshakeEx);
|
rail_write_handshake_ex_order(s, handshakeEx);
|
||||||
error = rail_server_send_pdu(context, s, TS_RAIL_ORDER_HANDSHAKE_EX);
|
error = rail_server_send_pdu(context, s, TS_RAIL_ORDER_HANDSHAKE_EX);
|
||||||
Stream_Free(s, TRUE);
|
Stream_Free(s, TRUE);
|
||||||
@ -1522,6 +1522,17 @@ void rail_server_context_free(RailServerContext* context)
|
|||||||
free(context);
|
free(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rail_server_set_handshake_ex_flags(RailServerContext* context, DWORD flags)
|
||||||
|
{
|
||||||
|
RailServerPrivate* priv;
|
||||||
|
|
||||||
|
if (!context || !context->priv)
|
||||||
|
return;
|
||||||
|
|
||||||
|
priv = context->priv;
|
||||||
|
priv->channelFlags = flags;
|
||||||
|
}
|
||||||
|
|
||||||
UINT rail_server_handle_messages(RailServerContext* context)
|
UINT rail_server_handle_messages(RailServerContext* context)
|
||||||
{
|
{
|
||||||
UINT status = CHANNEL_RC_OK;
|
UINT status = CHANNEL_RC_OK;
|
||||||
|
@ -141,6 +141,7 @@ extern "C"
|
|||||||
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
|
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
|
||||||
FREERDP_API void rail_server_context_free(RailServerContext* context);
|
FREERDP_API void rail_server_context_free(RailServerContext* context);
|
||||||
FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);
|
FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);
|
||||||
|
FREERDP_API void rail_server_set_handshake_ex_flags(RailServerContext* context, DWORD flags);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,15 @@ BOOL pf_rail_context_init(pServerContext* ps)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* when mstsc reconnects, it doesn't wait for a second handshake, so update all handshake flags
|
||||||
|
* to be SET, then set them again when the remote server sends his handshake.
|
||||||
|
*/
|
||||||
|
rail_server_set_handshake_ex_flags(rail,
|
||||||
|
TS_RAIL_ORDER_HANDSHAKEEX_FLAGS_HIDEF |
|
||||||
|
TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_EXTENDED_SPI_SUPPORTED |
|
||||||
|
TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_SNAP_ARRANGE_SUPPORTED);
|
||||||
|
|
||||||
rail->rdpcontext = (rdpContext*)ps;
|
rail->rdpcontext = (rdpContext*)ps;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user