Stream_Seek(s, 64); /* imeFileName (64 bytes) */
- if (settings->ServerMode != TRUE)
+ if (!settings->ServerMode)
{
if (inputFlags & INPUT_FLAG_FASTPATH_INPUT)
{
}
else if (inputFlags & INPUT_FLAG_FASTPATH_INPUT2)
{
- /* avertised by RDP 5.2, 6.0, 6.1 and 7.0 servers */
+ /* advertised by RDP 5.2, 6.0, 6.1 and 7.0 servers */
}
else
{
BOOL rdp_read_glyph_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
- UINT16 glyphSupportLevel;
-
if (length < 52)
return FALSE;
- Stream_Seek(s, 40); /* glyphCache (40 bytes) */
- Stream_Seek_UINT32(s); /* fragCache (4 bytes) */
- Stream_Read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
- Stream_Seek_UINT16(s); /* pad2Octets (2 bytes) */
+ /* glyphCache (40 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[0])); /* glyphCache0 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[1])); /* glyphCache1 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[2])); /* glyphCache2 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[3])); /* glyphCache3 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[4])); /* glyphCache4 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[5])); /* glyphCache5 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[6])); /* glyphCache6 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[7])); /* glyphCache7 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[8])); /* glyphCache8 (4 bytes) */
+ rdp_read_cache_definition(s, &(settings->GlyphCache[9])); /* glyphCache9 (4 bytes) */
+ rdp_read_cache_definition(s, settings->FragCache); /* fragCache (4 bytes) */
+
+ Stream_Read_UINT16(s, settings->GlyphSupportLevel); /* glyphSupportLevel (2 bytes) */
- settings->GlyphSupportLevel = glyphSupportLevel;
+ Stream_Seek_UINT16(s); /* pad2Octets (2 bytes) */
return TRUE;
}
BOOL rdp_read_large_pointer_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
+ UINT16 largePointerSupportFlags;
+
if (length < 6)
return FALSE;
- Stream_Seek_UINT16(s); /* largePointerSupportFlags (2 bytes) */
+ Stream_Read_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */
+
+ settings->LargePointerFlag = (largePointerSupportFlags & LARGE_POINTER_FLAG_96x96) ? 1 : 0;
return TRUE;
}
BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s)
{
BOOL status;
+ rdpSettings* settings;
UINT16 lengthSourceDescriptor;
UINT16 lengthCombinedCapabilities;
UINT16 numberCapabilities;
+ settings = rdp->settings;
+
if (Stream_GetRemainingLength(s) < 10)
return FALSE;
status = rdp_read_capability_sets(s, rdp->settings, numberCapabilities);
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_SURFACE_COMMANDS])
+ {
+ /* client does not support surface commands */
+ }
+
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_FRAME_ACKNOWLEDGE])
+ {
+ /* client does not support frame acks */
+ }
+
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_BITMAP_CACHE_V3_CODEC_ID])
+ {
+ /* client does not support bitmap cache v3 */
+ settings->BitmapCacheV3Enabled = FALSE;
+ }
+
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_BITMAP_CODECS])
+ {
+ /* client does not support bitmap codecs */
+
+ settings->RemoteFxCodec = FALSE;
+ settings->NSCodec = FALSE;
+ settings->JpegCodec = FALSE;
+ }
+
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_MULTI_FRAGMENT_UPDATE])
+ {
+ /* client does not support multi fragment updates */
+ }
+
+ if (!settings->ReceivedCapabilities[CAPSET_TYPE_LARGE_POINTER])
+ {
+ /* client does not support large pointers */
+ settings->LargePointerFlag = 0;
+ }
+
return status;
}
}
fprintf(stderr, "%s:%d: freerdp_pre_connect failed\n", __FILE__, __LINE__);
- goto freerdp_connect_finally;
+ goto freerdp_connect_finally;
}
status = rdp_client_connect(rdp);
if (instance->settings->AuthenticationOnly)
{
fprintf(stderr, "%s:%d: Authentication only, exit status %d\n", __FILE__, __LINE__, !status);
- goto freerdp_connect_finally;
- }
+ goto freerdp_connect_finally;
+ }
if (status)
{
connectErrorCode = POSTCONNECTERROR;
}
- goto freerdp_connect_finally;
+ goto freerdp_connect_finally;
}
if (instance->settings->PlayRemoteFx)
update->pcap_rfx = pcap_open(settings->PlayRemoteFxFile, FALSE);
if (!update->pcap_rfx)
- {
- status = FALSE;
- goto freerdp_connect_finally;
- }
+ {
+ status = FALSE;
+ goto freerdp_connect_finally;
+ }
else
+ {
update->play_rfx = TRUE;
+ }
while (pcap_has_next_record(update->pcap_rfx))
{
Stream_Release(s);
}
- status = TRUE;
- goto freerdp_connect_finally;
+ status = TRUE;
+ goto freerdp_connect_finally;
}
}
SetEvent(rdp->transport->connectedEvent);
-freerdp_connect_finally:
+ freerdp_connect_finally:
- fprintf(stderr, "ConnectionResult: %s\n", status ? "TRUE" : "FALSE");
EventArgsInit(&e, "freerdp");
e.result = status ? 0 : -1;
PubSub_OnConnectionResult(instance->context->pubSub, instance->context, &e);
static wEventType FreeRDP_Events[] =
{
- DEFINE_EVENT_ENTRY(WindowStateChange)
- DEFINE_EVENT_ENTRY(ResizeWindow)
- DEFINE_EVENT_ENTRY(LocalResizeWindow)
- DEFINE_EVENT_ENTRY(EmbedWindow)
- DEFINE_EVENT_ENTRY(PanningChange)
- DEFINE_EVENT_ENTRY(ScalingFactorChange)
- DEFINE_EVENT_ENTRY(ErrorInfo)
- DEFINE_EVENT_ENTRY(ParamChange)
- DEFINE_EVENT_ENTRY(Terminate)
- DEFINE_EVENT_ENTRY(ConnectionResult)
- DEFINE_EVENT_ENTRY(ChannelConnected)
- DEFINE_EVENT_ENTRY(ChannelDisconnected)
+ DEFINE_EVENT_ENTRY(WindowStateChange)
+ DEFINE_EVENT_ENTRY(ResizeWindow)
+ DEFINE_EVENT_ENTRY(LocalResizeWindow)
+ DEFINE_EVENT_ENTRY(EmbedWindow)
+ DEFINE_EVENT_ENTRY(PanningChange)
+ DEFINE_EVENT_ENTRY(ScalingFactorChange)
+ DEFINE_EVENT_ENTRY(ErrorInfo)
+ DEFINE_EVENT_ENTRY(ParamChange)
+ DEFINE_EVENT_ENTRY(Terminate)
+ DEFINE_EVENT_ENTRY(ConnectionResult)
+ DEFINE_EVENT_ENTRY(ChannelConnected)
+ DEFINE_EVENT_ENTRY(ChannelDisconnected)
};
/** Allocator function for a rdp context.