rail: server: add API to set railHandshakeExflags

This commit is contained in:
Kobi Mizrachi 2020-07-07 15:31:20 +03:00
parent b2d15eedc9
commit 004c2f49e4
2 changed files with 14 additions and 2 deletions

View File

@ -297,8 +297,6 @@ static UINT rail_send_server_handshake_ex(RailServerContext* context,
if (!context || !handshakeEx || !context->priv)
return ERROR_INVALID_PARAMETER;
/* Save channel flags to context */
context->priv->channelFlags = handshakeEx->railHandshakeFlags;
s = rail_pdu_init(RAIL_HANDSHAKE_EX_ORDER_LENGTH);
if (!s)
@ -307,6 +305,8 @@ static UINT rail_send_server_handshake_ex(RailServerContext* context,
return CHANNEL_RC_NO_MEMORY;
}
rail_server_set_handshake_ex_flags(context, handshakeEx->railHandshakeFlags);
rail_write_handshake_ex_order(s, handshakeEx);
error = rail_server_send_pdu(context, s, TS_RAIL_ORDER_HANDSHAKE_EX);
Stream_Free(s, TRUE);
@ -1522,6 +1522,17 @@ void rail_server_context_free(RailServerContext* 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 status = CHANNEL_RC_OK;

View File

@ -141,6 +141,7 @@ extern "C"
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
FREERDP_API void rail_server_context_free(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
}