server/shadow: avoid sending pointer updates when not active, fix remdesk leak
This commit is contained in:
parent
1c88822ccb
commit
7881ec762e
@ -156,6 +156,8 @@ static int remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
|
|||||||
|
|
||||||
remdesk_virtual_channel_write(context, s);
|
remdesk_virtual_channel_write(context, s);
|
||||||
|
|
||||||
|
Stream_Free(s, TRUE);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2077,12 +2077,25 @@ int freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings->LyncRdpMode)
|
||||||
|
{
|
||||||
|
settings->EncomspVirtualChannel = TRUE;
|
||||||
|
settings->RemdeskVirtualChannel = TRUE;
|
||||||
|
settings->CompressionEnabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings->RemoteAssistanceMode)
|
if (settings->RemoteAssistanceMode)
|
||||||
{
|
{
|
||||||
freerdp_client_load_static_channel_addin(channels, settings, "encomsp", settings);
|
settings->EncomspVirtualChannel = TRUE;
|
||||||
freerdp_client_load_static_channel_addin(channels, settings, "remdesk", settings);
|
settings->RemdeskVirtualChannel = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings->EncomspVirtualChannel)
|
||||||
|
freerdp_client_load_static_channel_addin(channels, settings, "encomsp", settings);
|
||||||
|
|
||||||
|
if (settings->RemdeskVirtualChannel)
|
||||||
|
freerdp_client_load_static_channel_addin(channels, settings, "remdesk", settings);
|
||||||
|
|
||||||
for (index = 0; index < settings->StaticChannelCount; index++)
|
for (index = 0; index < settings->StaticChannelCount; index++)
|
||||||
{
|
{
|
||||||
args = settings->StaticChannelArray[index];
|
args = settings->StaticChannelArray[index];
|
||||||
|
@ -599,6 +599,9 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
|
|||||||
#define FreeRDP_RemoteAssistancePassStub 1026
|
#define FreeRDP_RemoteAssistancePassStub 1026
|
||||||
#define FreeRDP_RemoteAssistancePassword 1027
|
#define FreeRDP_RemoteAssistancePassword 1027
|
||||||
#define FreeRDP_RemoteAssistanceRCTicket 1028
|
#define FreeRDP_RemoteAssistanceRCTicket 1028
|
||||||
|
#define FreeRDP_EncomspVirtualChannel 1029
|
||||||
|
#define FreeRDP_RemdeskVirtualChannel 1030
|
||||||
|
#define FreeRDP_LyncRdpMode 1031
|
||||||
#define FreeRDP_TlsSecurity 1088
|
#define FreeRDP_TlsSecurity 1088
|
||||||
#define FreeRDP_NlaSecurity 1089
|
#define FreeRDP_NlaSecurity 1089
|
||||||
#define FreeRDP_RdpSecurity 1090
|
#define FreeRDP_RdpSecurity 1090
|
||||||
@ -971,7 +974,10 @@ struct rdp_settings
|
|||||||
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
|
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
|
||||||
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
|
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
|
||||||
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
|
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
|
||||||
UINT64 padding1088[1088 - 1029]; /* 1029 */
|
ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
|
||||||
|
ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
|
||||||
|
ALIGN64 BOOL LyncRdpMode; /* 1031 */
|
||||||
|
UINT64 padding1088[1088 - 1032]; /* 1032 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* X.224 Connection Request/Confirm
|
* X.224 Connection Request/Confirm
|
||||||
|
@ -67,6 +67,12 @@ void shadow_client_context_new(freerdp_peer* peer, rdpShadowClient* client)
|
|||||||
|
|
||||||
settings->RdpKeyFile = _strdup(settings->PrivateKeyFile);
|
settings->RdpKeyFile = _strdup(settings->PrivateKeyFile);
|
||||||
|
|
||||||
|
if (server->ipcSocket)
|
||||||
|
{
|
||||||
|
settings->LyncRdpMode = TRUE;
|
||||||
|
settings->CompressionEnabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
client->inLobby = TRUE;
|
client->inLobby = TRUE;
|
||||||
client->mayView = server->mayView;
|
client->mayView = server->mayView;
|
||||||
client->mayInteract = server->mayInteract;
|
client->mayInteract = server->mayInteract;
|
||||||
@ -839,12 +845,15 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
|
|||||||
pointerPosition.xPos = msg->xPos;
|
pointerPosition.xPos = msg->xPos;
|
||||||
pointerPosition.yPos = msg->yPos;
|
pointerPosition.yPos = msg->yPos;
|
||||||
|
|
||||||
if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
|
if (client->activated)
|
||||||
{
|
{
|
||||||
IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
|
if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
|
||||||
|
{
|
||||||
|
IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
|
||||||
|
|
||||||
client->pointerX = msg->xPos;
|
client->pointerX = msg->xPos;
|
||||||
client->pointerY = msg->yPos;
|
client->pointerY = msg->yPos;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free(msg);
|
free(msg);
|
||||||
@ -869,14 +878,17 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
|
|||||||
|
|
||||||
pointerCached.cacheIndex = pointerColor->cacheIndex;
|
pointerCached.cacheIndex = pointerColor->cacheIndex;
|
||||||
|
|
||||||
shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
|
if (client->activated)
|
||||||
msg->width, msg->height, pointerColor);
|
{
|
||||||
|
shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
|
||||||
|
msg->width, msg->height, pointerColor);
|
||||||
|
|
||||||
IFCALL(update->pointer->PointerNew, context, &pointerNew);
|
IFCALL(update->pointer->PointerNew, context, &pointerNew);
|
||||||
IFCALL(update->pointer->PointerCached, context, &pointerCached);
|
IFCALL(update->pointer->PointerCached, context, &pointerCached);
|
||||||
|
|
||||||
free(pointerColor->xorMaskData);
|
free(pointerColor->xorMaskData);
|
||||||
free(pointerColor->andMaskData);
|
free(pointerColor->andMaskData);
|
||||||
|
}
|
||||||
|
|
||||||
free(msg->pixels);
|
free(msg->pixels);
|
||||||
free(msg);
|
free(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user