if (!settings)
return NULL;
- settings->ServerMode = (flags & FREERDP_SETTINGS_SERVER_MODE) ? TRUE : FALSE;
- settings->WaitForOutputBufferFlush = TRUE;
-
- settings->DesktopWidth = 1024;
- settings->DesktopHeight = 768;
- settings->Workarea = FALSE;
- settings->Fullscreen = FALSE;
- settings->GrabKeyboard = TRUE;
- settings->Decorations = TRUE;
- settings->RdpVersion = 7;
- settings->ColorDepth = 16;
- settings->ExtSecurity = FALSE;
- settings->NlaSecurity = TRUE;
- settings->TlsSecurity = TRUE;
- settings->RdpSecurity = TRUE;
- settings->NegotiateSecurityLayer = TRUE;
- settings->RestrictedAdminModeRequired = FALSE;
- settings->MstscCookieMode = FALSE;
- settings->CookieMaxLength = DEFAULT_COOKIE_MAX_LENGTH;
- settings->ClientBuild = 2600;
- settings->KeyboardType = 4;
- settings->KeyboardSubType = 0;
- settings->KeyboardFunctionKey = 12;
- settings->KeyboardLayout = 0;
- settings->UseRdpSecurityLayer = FALSE;
- settings->SaltedChecksum = TRUE;
- settings->ServerPort = 3389;
- settings->GatewayPort = 443;
- settings->DesktopResize = TRUE;
- settings->ToggleFullscreen = TRUE;
- settings->DesktopPosX = 0;
- settings->DesktopPosY = 0;
-
- settings->PerformanceFlags = PERF_FLAG_NONE;
- settings->AllowFontSmoothing = FALSE;
- settings->AllowDesktopComposition = FALSE;
- settings->DisableWallpaper = FALSE;
- settings->DisableFullWindowDrag = TRUE;
- settings->DisableMenuAnims = TRUE;
- settings->DisableThemes = FALSE;
- settings->ConnectionType = CONNECTION_TYPE_LAN;
-
- settings->EncryptionMethods = ENCRYPTION_METHOD_NONE;
- settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
-
- settings->CompressionEnabled = TRUE;
-
- if (settings->ServerMode)
- settings->CompressionLevel = PACKET_COMPR_TYPE_RDP61;
- else
- settings->CompressionLevel = PACKET_COMPR_TYPE_RDP61;
-
- settings->Authentication = TRUE;
- settings->AuthenticationOnly = FALSE;
- settings->CredentialsFromStdin = FALSE;
- settings->DisableCredentialsDelegation = FALSE;
- settings->AuthenticationLevel = 2;
-
- settings->ChannelCount = 0;
- settings->ChannelDefArraySize = 32;
- settings->ChannelDefArray = (CHANNEL_DEF*) calloc(settings->ChannelDefArraySize, sizeof(CHANNEL_DEF));
- if (!settings->ChannelDefArray)
- goto out_fail;
+ settings->ServerMode = (flags & FREERDP_SETTINGS_SERVER_MODE) ? TRUE : FALSE;
+ settings->WaitForOutputBufferFlush = TRUE;
+
+ settings->DesktopWidth = 1024;
+ settings->DesktopHeight = 768;
+ settings->Workarea = FALSE;
+ settings->Fullscreen = FALSE;
+ settings->GrabKeyboard = TRUE;
+ settings->Decorations = TRUE;
+ settings->RdpVersion = 7;
+ settings->ColorDepth = 16;
+ settings->ExtSecurity = FALSE;
+ settings->NlaSecurity = TRUE;
+ settings->TlsSecurity = TRUE;
+ settings->RdpSecurity = TRUE;
+ settings->NegotiateSecurityLayer = TRUE;
+ settings->RestrictedAdminModeRequired = FALSE;
+ settings->MstscCookieMode = FALSE;
+ settings->CookieMaxLength = DEFAULT_COOKIE_MAX_LENGTH;
+ settings->ClientBuild = 2600;
+ settings->KeyboardType = 4;
+ settings->KeyboardSubType = 0;
+ settings->KeyboardFunctionKey = 12;
+ settings->KeyboardLayout = 0;
+ settings->UseRdpSecurityLayer = FALSE;
+ settings->SaltedChecksum = TRUE;
+ settings->ServerPort = 3389;
+ settings->GatewayPort = 443;
+ settings->DesktopResize = TRUE;
+ settings->ToggleFullscreen = TRUE;
+ settings->DesktopPosX = 0;
+ settings->DesktopPosY = 0;
+
+ settings->PerformanceFlags = PERF_FLAG_NONE;
+ settings->AllowFontSmoothing = FALSE;
+ settings->AllowDesktopComposition = FALSE;
+ settings->DisableWallpaper = FALSE;
+ settings->DisableFullWindowDrag = TRUE;
+ settings->DisableMenuAnims = TRUE;
+ settings->DisableThemes = FALSE;
+ settings->ConnectionType = CONNECTION_TYPE_LAN;
+
+ settings->EncryptionMethods = ENCRYPTION_METHOD_NONE;
+ settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE;
+
+ settings->CompressionEnabled = TRUE;
- settings->MonitorCount = 0;
- settings->MonitorDefArraySize = 32;
- settings->MonitorDefArray = (rdpMonitor*) calloc(settings->MonitorDefArraySize, sizeof(rdpMonitor));
- if (!settings->MonitorDefArray)
- goto out_fail;
+ if (settings->ServerMode)
+ settings->CompressionLevel = PACKET_COMPR_TYPE_RDP61;
+ else
+ settings->CompressionLevel = PACKET_COMPR_TYPE_RDP61;
+
+ settings->Authentication = TRUE;
+ settings->AuthenticationOnly = FALSE;
+ settings->CredentialsFromStdin = FALSE;
+ settings->DisableCredentialsDelegation = FALSE;
+ settings->AuthenticationLevel = 2;
+
+ settings->ChannelCount = 0;
+ settings->ChannelDefArraySize = 32;
+ settings->ChannelDefArray = (CHANNEL_DEF*) calloc(settings->ChannelDefArraySize, sizeof(CHANNEL_DEF));
+ if (!settings->ChannelDefArray)
+ goto out_fail;
- settings->MonitorLocalShiftX = 0;
- settings->MonitorLocalShiftY = 0;
+ settings->MonitorCount = 0;
+ settings->MonitorDefArraySize = 32;
+ settings->MonitorDefArray = (rdpMonitor*) calloc(settings->MonitorDefArraySize, sizeof(rdpMonitor));
+ if (!settings->MonitorDefArray)
+ goto out_fail;
- settings->MonitorIds = (UINT32*) calloc(16, sizeof(UINT32));
- if(!settings->MonitorIds)
- goto out_fail;
+ settings->MonitorLocalShiftX = 0;
+ settings->MonitorLocalShiftY = 0;
- if (!settings_get_computer_name(settings))
+ settings->MonitorIds = (UINT32*) calloc(16, sizeof(UINT32));
+ if(!settings->MonitorIds)
goto out_fail;
- settings->ReceivedCapabilities = calloc(1, 32);
- if (!settings->ReceivedCapabilities)
- goto out_fail;
+ if (!settings_get_computer_name(settings))
+ goto out_fail;
- settings->OrderSupport = calloc(1, 32);
- if (!settings->OrderSupport)
- goto out_fail;
+ settings->ReceivedCapabilities = calloc(1, 32);
+ if (!settings->ReceivedCapabilities)
+ goto out_fail;
- settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
- settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = TRUE;
- settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
- settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE;
- settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
- settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
- settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
- settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = TRUE;
- settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
- settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
- settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
- settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
- settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
- settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = TRUE;
- settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = TRUE;
-
- settings->ClientProductId = calloc(1, 32);
- if (!settings->ClientProductId)
- goto out_fail;
+ settings->OrderSupport = calloc(1, 32);
+ if (!settings->OrderSupport)
+ goto out_fail;
- settings->ClientHostname = calloc(1, 32);
- if (!settings->ClientHostname)
- goto out_fail;
- gethostname(settings->ClientHostname, 31);
- settings->ClientHostname[31] = 0;
+ settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = TRUE;
+ settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
+ settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
+ settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = TRUE;
+ settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
+ settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
+ settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
+ settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
+ settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
+ settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = TRUE;
+ settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = TRUE;
+
+ settings->ClientProductId = calloc(1, 32);
+ if (!settings->ClientProductId)
+ goto out_fail;
- settings->ColorPointerFlag = TRUE;
- settings->LargePointerFlag = TRUE;
- settings->PointerCacheSize = 20;
- settings->SoundBeepsEnabled = TRUE;
+ settings->ClientHostname = calloc(1, 32);
+ if (!settings->ClientHostname)
+ goto out_fail;
+ gethostname(settings->ClientHostname, 31);
+ settings->ClientHostname[31] = 0;
- settings->DrawGdiPlusEnabled = FALSE;
+ settings->ColorPointerFlag = TRUE;
+ settings->LargePointerFlag = TRUE;
+ settings->PointerCacheSize = 20;
+ settings->SoundBeepsEnabled = TRUE;
- settings->DrawAllowSkipAlpha = TRUE;
- settings->DrawAllowColorSubsampling = FALSE;
- settings->DrawAllowDynamicColorFidelity = FALSE;
+ settings->DrawGdiPlusEnabled = FALSE;
- settings->FrameMarkerCommandEnabled = TRUE;
- settings->SurfaceFrameMarkerEnabled = TRUE;
- settings->BitmapCacheV3Enabled = FALSE;
+ settings->DrawAllowSkipAlpha = TRUE;
+ settings->DrawAllowColorSubsampling = FALSE;
+ settings->DrawAllowDynamicColorFidelity = FALSE;
- settings->BitmapCacheEnabled = TRUE;
- settings->BitmapCachePersistEnabled = FALSE;
- settings->AllowCacheWaitingList = TRUE;
+ settings->FrameMarkerCommandEnabled = TRUE;
+ settings->SurfaceFrameMarkerEnabled = TRUE;
+ settings->BitmapCacheV3Enabled = FALSE;
- settings->BitmapCacheV2NumCells = 5;
- settings->BitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*) malloc(sizeof(BITMAP_CACHE_V2_CELL_INFO) * 6);
- if (!settings->BitmapCacheV2CellInfo)
- goto out_fail;
- settings->BitmapCacheV2CellInfo[0].numEntries = 600;
- settings->BitmapCacheV2CellInfo[0].persistent = FALSE;
- settings->BitmapCacheV2CellInfo[1].numEntries = 600;
- settings->BitmapCacheV2CellInfo[1].persistent = FALSE;
- settings->BitmapCacheV2CellInfo[2].numEntries = 2048;
- settings->BitmapCacheV2CellInfo[2].persistent = FALSE;
- settings->BitmapCacheV2CellInfo[3].numEntries = 4096;
- settings->BitmapCacheV2CellInfo[3].persistent = FALSE;
- settings->BitmapCacheV2CellInfo[4].numEntries = 2048;
- settings->BitmapCacheV2CellInfo[4].persistent = FALSE;
-
- settings->NoBitmapCompressionHeader = TRUE;
-
- settings->RefreshRect = TRUE;
- settings->SuppressOutput = TRUE;
-
- settings->GlyphSupportLevel = GLYPH_SUPPORT_FULL;
- settings->GlyphCache = malloc(sizeof(GLYPH_CACHE_DEFINITION) * 10);
- if(!settings->GlyphCache)
- goto out_fail;
- settings->FragCache = malloc(sizeof(GLYPH_CACHE_DEFINITION));
- if(!settings->FragCache)
- goto out_fail;
- settings->GlyphCache[0].cacheEntries = 254;
- settings->GlyphCache[0].cacheMaximumCellSize = 4;
- settings->GlyphCache[1].cacheEntries = 254;
- settings->GlyphCache[1].cacheMaximumCellSize = 4;
- settings->GlyphCache[2].cacheEntries = 254;
- settings->GlyphCache[2].cacheMaximumCellSize = 8;
- settings->GlyphCache[3].cacheEntries = 254;
- settings->GlyphCache[3].cacheMaximumCellSize = 8;
- settings->GlyphCache[4].cacheEntries = 254;
- settings->GlyphCache[4].cacheMaximumCellSize = 16;
- settings->GlyphCache[5].cacheEntries = 254;
- settings->GlyphCache[5].cacheMaximumCellSize = 32;
- settings->GlyphCache[6].cacheEntries = 254;
- settings->GlyphCache[6].cacheMaximumCellSize = 64;
- settings->GlyphCache[7].cacheEntries = 254;
- settings->GlyphCache[7].cacheMaximumCellSize = 128;
- settings->GlyphCache[8].cacheEntries = 254;
- settings->GlyphCache[8].cacheMaximumCellSize = 256;
- settings->GlyphCache[9].cacheEntries = 64;
- settings->GlyphCache[9].cacheMaximumCellSize = 256;
- settings->FragCache->cacheEntries = 256;
- settings->FragCache->cacheMaximumCellSize = 256;
-
- settings->OffscreenSupportLevel = TRUE;
- settings->OffscreenCacheSize = 7680;
- settings->OffscreenCacheEntries = 2000;
-
- settings->DrawNineGridCacheSize = 2560;
- settings->DrawNineGridCacheEntries = 256;
-
- settings->ClientDir = _strdup(client_dll);
- if (!settings->ClientDir)
- goto out_fail;
+ settings->BitmapCacheEnabled = TRUE;
+ settings->BitmapCachePersistEnabled = FALSE;
+ settings->AllowCacheWaitingList = TRUE;
- settings->RemoteAppNumIconCaches = 3;
- settings->RemoteAppNumIconCacheEntries = 12;
+ settings->BitmapCacheV2NumCells = 5;
+ settings->BitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*) malloc(sizeof(BITMAP_CACHE_V2_CELL_INFO) * 6);
+ if (!settings->BitmapCacheV2CellInfo)
+ goto out_fail;
+ settings->BitmapCacheV2CellInfo[0].numEntries = 600;
+ settings->BitmapCacheV2CellInfo[0].persistent = FALSE;
+ settings->BitmapCacheV2CellInfo[1].numEntries = 600;
+ settings->BitmapCacheV2CellInfo[1].persistent = FALSE;
+ settings->BitmapCacheV2CellInfo[2].numEntries = 2048;
+ settings->BitmapCacheV2CellInfo[2].persistent = FALSE;
+ settings->BitmapCacheV2CellInfo[3].numEntries = 4096;
+ settings->BitmapCacheV2CellInfo[3].persistent = FALSE;
+ settings->BitmapCacheV2CellInfo[4].numEntries = 2048;
+ settings->BitmapCacheV2CellInfo[4].persistent = FALSE;
+
+ settings->NoBitmapCompressionHeader = TRUE;
+
+ settings->RefreshRect = TRUE;
+ settings->SuppressOutput = TRUE;
+
+ settings->GlyphSupportLevel = GLYPH_SUPPORT_FULL;
+ settings->GlyphCache = malloc(sizeof(GLYPH_CACHE_DEFINITION) * 10);
+ if(!settings->GlyphCache)
+ goto out_fail;
+ settings->FragCache = malloc(sizeof(GLYPH_CACHE_DEFINITION));
+ if(!settings->FragCache)
+ goto out_fail;
+ settings->GlyphCache[0].cacheEntries = 254;
+ settings->GlyphCache[0].cacheMaximumCellSize = 4;
+ settings->GlyphCache[1].cacheEntries = 254;
+ settings->GlyphCache[1].cacheMaximumCellSize = 4;
+ settings->GlyphCache[2].cacheEntries = 254;
+ settings->GlyphCache[2].cacheMaximumCellSize = 8;
+ settings->GlyphCache[3].cacheEntries = 254;
+ settings->GlyphCache[3].cacheMaximumCellSize = 8;
+ settings->GlyphCache[4].cacheEntries = 254;
+ settings->GlyphCache[4].cacheMaximumCellSize = 16;
+ settings->GlyphCache[5].cacheEntries = 254;
+ settings->GlyphCache[5].cacheMaximumCellSize = 32;
+ settings->GlyphCache[6].cacheEntries = 254;
+ settings->GlyphCache[6].cacheMaximumCellSize = 64;
+ settings->GlyphCache[7].cacheEntries = 254;
+ settings->GlyphCache[7].cacheMaximumCellSize = 128;
+ settings->GlyphCache[8].cacheEntries = 254;
+ settings->GlyphCache[8].cacheMaximumCellSize = 256;
+ settings->GlyphCache[9].cacheEntries = 64;
+ settings->GlyphCache[9].cacheMaximumCellSize = 256;
+ settings->FragCache->cacheEntries = 256;
+ settings->FragCache->cacheMaximumCellSize = 256;
+
+ settings->OffscreenSupportLevel = TRUE;
+ settings->OffscreenCacheSize = 7680;
+ settings->OffscreenCacheEntries = 2000;
+
+ settings->DrawNineGridCacheSize = 2560;
+ settings->DrawNineGridCacheEntries = 256;
+
+ settings->ClientDir = _strdup(client_dll);
+ if (!settings->ClientDir)
+ goto out_fail;
- settings->VirtualChannelChunkSize = CHANNEL_CHUNK_LENGTH;
+ settings->RemoteAppNumIconCaches = 3;
+ settings->RemoteAppNumIconCacheEntries = 12;
- settings->MultifragMaxRequestSize = 0xFFFF;
+ settings->VirtualChannelChunkSize = CHANNEL_CHUNK_LENGTH;
- settings->GatewayUseSameCredentials = FALSE;
- settings->GatewayBypassLocal = FALSE;
- settings->GatewayRpcTransport = TRUE;
- settings->GatewayHttpTransport = TRUE;
- settings->GatewayUdpTransport = TRUE;
+ settings->MultifragMaxRequestSize = 0xFFFF;
- settings->FastPathInput = TRUE;
- settings->FastPathOutput = TRUE;
+ settings->GatewayUseSameCredentials = FALSE;
+ settings->GatewayBypassLocal = FALSE;
+ settings->GatewayRpcTransport = TRUE;
+ settings->GatewayHttpTransport = TRUE;
+ settings->GatewayUdpTransport = TRUE;
- settings->FrameAcknowledge = 2;
- settings->MouseMotion = TRUE;
+ settings->FastPathInput = TRUE;
+ settings->FastPathOutput = TRUE;
- settings->NSCodecColorLossLevel = 3;
- settings->NSCodecAllowSubsampling = TRUE;
- settings->NSCodecAllowDynamicColorFidelity = TRUE;
+ settings->FrameAcknowledge = 2;
+ settings->MouseMotion = TRUE;
- settings->AutoReconnectionEnabled = FALSE;
- settings->AutoReconnectMaxRetries = 20;
+ settings->NSCodecColorLossLevel = 3;
+ settings->NSCodecAllowSubsampling = TRUE;
+ settings->NSCodecAllowDynamicColorFidelity = TRUE;
- settings->GfxThinClient = TRUE;
- settings->GfxSmallCache = FALSE;
- settings->GfxProgressive = FALSE;
- settings->GfxProgressiveV2 = FALSE;
- settings->GfxH264 = FALSE;
+ settings->AutoReconnectionEnabled = FALSE;
+ settings->AutoReconnectMaxRetries = 20;
- settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*) calloc(1, sizeof(ARC_CS_PRIVATE_PACKET));
- if (!settings->ClientAutoReconnectCookie)
- goto out_fail;
- settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*) calloc(1, sizeof(ARC_SC_PRIVATE_PACKET));
- if (!settings->ServerAutoReconnectCookie)
- goto out_fail;
+ settings->GfxThinClient = TRUE;
+ settings->GfxSmallCache = FALSE;
+ settings->GfxProgressive = FALSE;
+ settings->GfxProgressiveV2 = FALSE;
+ settings->GfxH264 = FALSE;
- settings->ClientTimeZone = (TIME_ZONE_INFO*) calloc(1,sizeof(TIME_ZONE_INFO));
- if (!settings->ClientTimeZone)
- goto out_fail;
+ settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*) calloc(1, sizeof(ARC_CS_PRIVATE_PACKET));
+ if (!settings->ClientAutoReconnectCookie)
+ goto out_fail;
+ settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*) calloc(1, sizeof(ARC_SC_PRIVATE_PACKET));
+ if (!settings->ServerAutoReconnectCookie)
+ goto out_fail;
- settings->DeviceArraySize = 16;
- settings->DeviceArray = (RDPDR_DEVICE**) calloc(1, sizeof(RDPDR_DEVICE*) * settings->DeviceArraySize);
- if (!settings->DeviceArray)
- goto out_fail;
+ settings->ClientTimeZone = (TIME_ZONE_INFO*) calloc(1,sizeof(TIME_ZONE_INFO));
+ if (!settings->ClientTimeZone)
+ goto out_fail;
- settings->StaticChannelArraySize = 16;
- settings->StaticChannelArray = (ADDIN_ARGV**)
- calloc(1, sizeof(ADDIN_ARGV*) * settings->StaticChannelArraySize);
- if (!settings->StaticChannelArray)
- goto out_fail;
+ settings->DeviceArraySize = 16;
+ settings->DeviceArray = (RDPDR_DEVICE**) calloc(1, sizeof(RDPDR_DEVICE*) * settings->DeviceArraySize);
+ if (!settings->DeviceArray)
+ goto out_fail;
- settings->DynamicChannelArraySize = 16;
- settings->DynamicChannelArray = (ADDIN_ARGV**)
- calloc(1, sizeof(ADDIN_ARGV*) * settings->DynamicChannelArraySize);
- if(!settings->DynamicChannelArray)
- goto out_fail;
+ settings->StaticChannelArraySize = 16;
+ settings->StaticChannelArray = (ADDIN_ARGV**)
+ calloc(1, sizeof(ADDIN_ARGV*) * settings->StaticChannelArraySize);
+ if (!settings->StaticChannelArray)
+ goto out_fail;
- settings->HomePath = GetKnownPath(KNOWN_PATH_HOME);
- if (!settings->HomePath)
- goto out_fail;
+ settings->DynamicChannelArraySize = 16;
+ settings->DynamicChannelArray = (ADDIN_ARGV**)
+ calloc(1, sizeof(ADDIN_ARGV*) * settings->DynamicChannelArraySize);
+ if(!settings->DynamicChannelArray)
+ goto out_fail;
+
+ settings->HomePath = GetKnownPath(KNOWN_PATH_HOME);
+ if (!settings->HomePath)
+ goto out_fail;
- /* For default FreeRDP continue using same config directory
- * as in old releases.
- * Custom builds use <Vendor>/<Product> as config folder. */
- if (_stricmp(FREERDP_VENDOR_STRING, FREERDP_PRODUCT_STRING))
+ /* For default FreeRDP continue using same config directory
+ * as in old releases.
+ * Custom builds use <Vendor>/<Product> as config folder. */
+ if (_stricmp(FREERDP_VENDOR_STRING, FREERDP_PRODUCT_STRING))
+ {
+ base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME,
+ FREERDP_VENDOR_STRING);
+ if (base)
{
- base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME,
- FREERDP_VENDOR_STRING);
- if (base)
- {
- settings->ConfigPath = GetCombinedPath(
- base,
- FREERDP_PRODUCT_STRING);
- }
- free (base);
- } else {
- int i;
- char product[sizeof(FREERDP_PRODUCT_STRING)];
-
- memset(product, 0, sizeof(product));
- for (i=0; i<sizeof(product); i++)
- product[i] = tolower(FREERDP_PRODUCT_STRING[i]);
-
- settings->ConfigPath = GetKnownSubPath(
- KNOWN_PATH_XDG_CONFIG_HOME,
- product);
+ settings->ConfigPath = GetCombinedPath(
+ base,
+ FREERDP_PRODUCT_STRING);
}
+ free (base);
+ } else {
+ int i;
+ char product[sizeof(FREERDP_PRODUCT_STRING)];
+
+ memset(product, 0, sizeof(product));
+ for (i=0; i<sizeof(product); i++)
+ product[i] = tolower(FREERDP_PRODUCT_STRING[i]);
+
+ settings->ConfigPath = GetKnownSubPath(
+ KNOWN_PATH_XDG_CONFIG_HOME,
+ product);
+ }
- if (!settings->ConfigPath)
- goto out_fail;
+ if (!settings->ConfigPath)
+ goto out_fail;
- settings_load_hkey_local_machine(settings);
+ settings_load_hkey_local_machine(settings);
- settings->SettingsModified = (BYTE*) calloc(1, sizeof(rdpSettings) / 8 );
- if(!settings->SettingsModified)
- goto out_fail;
+ settings->SettingsModified = (BYTE*) calloc(1, sizeof(rdpSettings) / 8 );
+ if(!settings->SettingsModified)
+ goto out_fail;
return settings;