2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "SocketSubsystem.h"
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "Misc/CommandLine.h"
|
|
|
|
|
#include "Misc/ScopeLock.h"
|
|
|
|
|
#include "SocketSubsystemModule.h"
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
|
#include "IPAddress.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "Sockets.h"
|
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3208226)
#lockdown Nick.Penwarden
#rb None
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3173153 on 2016/10/25 by Graeme.Thornton
Pak signing changes
- Integrated into EDL loader
- Changed to not encrypt each CRC in the sig file, rather just store a single encryped signature of the entire sig file. Removes need to decrypt thousands of signatures at startup.
Change 3173531 on 2016/10/25 by Steven.Hutton
Removing unused j query packages.
Change 3174743 on 2016/10/26 by Gil.Gribb
UE4 - fixed COTF with EDL
Change 3177896 on 2016/10/28 by Steve.Robb
TSharedPtr and TSharedRef aliasing constructors.
Removal of static_asserts for TSharedPtr<UObject>.
Change 3180343 on 2016/10/31 by Steve.Robb
Reimplementation of changes from CL#s 3050329 and 3105715 that were lost in merges 3094597 and 3105741.
Change 3181382 on 2016/11/01 by Steve.Robb
Visual Studio debugger visualizers for delegates.
Change 3182738 on 2016/11/02 by Graeme.Thornton
Re-enable signed archive reader so non-pakpreacher based reads still get signature checked
Change 3183420 on 2016/11/02 by Steve.Robb
Fix to TIsZeroConstructType for TScriptDelegate.
Change 3184872 on 2016/11/03 by Robert.Manuszewski
Fixing memory stomps in SSL certificate initialization (found with mallocstomp)
Change 3184873 on 2016/11/03 by Robert.Manuszewski
Adding thread safety checks to async loading code
Change 3185535 on 2016/11/03 by Ben.Zeigler
Fix it so calling CreateDefaultSubobject with bTransient = true sets the object transient flag. This fixes EDL Crashes involving components.
Change 3186636 on 2016/11/04 by Graeme.Thornton
AES encryption integrated into EDL system
Pak signing and AES encryption now configurable by ini files rather than magical text files
Change 3186637 on 2016/11/04 by Graeme.Thornton
Configured pak signing and encryption in ShooterGame for reference
Change 3186639 on 2016/11/04 by Graeme.Thornton
Encryption changes for Orion
* Move pak signing keys into new INI format
* Add AES key and enable INI file encryption
Change 3186661 on 2016/11/04 by Graeme.Thornton
Change unrealpak command line params to accept AES key as a separete parameter
Change 3186670 on 2016/11/04 by Robert.Manuszewski
Adding a null check before using a package pointer in Linker code
#jira UE-38237
Change 3186775 on 2016/11/04 by Graeme.Thornton
Fix UBT defines that come in as quoted strings, losing the quotes when passed to the compiler
- PS4 and Mac fixes. Other platforms might need fixing too!
Change 3186823 on 2016/11/04 by Graeme.Thornton
Fixed an incorrect size check in the EDL pak signing code
Change 3186925 on 2016/11/04 by Graeme.Thornton
Allow UnrealPak to read encryption settings from project ini files
Change 3189885 on 2016/11/08 by Graeme.Thornton
Static analysis warning fix
Change 3190015 on 2016/11/08 by Robert.Manuszewski
Thread safety fix for UBlueprintGeneratedClass::PostLoadDefaultObject while UBlueprintGeneratedClass::SerializeDefaultObject runs on the async loading thread
Change 3190253 on 2016/11/08 by Chris.Wood
Improved MDD performance for on the CR server.
[UE-37566] - Improve MDD performance on CR server
Blocked MDD init'ing the crash handling code as it isn't desirable on the server.
Removed redundant call to SetSymbolPathsFromModules() from CrashDebugHelper.
Change 3192993 on 2016/11/10 by Robert.Manuszewski
Thread Heartbeat will no longer report the same hang multiple times.
Change 3193111 on 2016/11/10 by Robert.Manuszewski
Minor change in the condition that detects the same hangs - allow the same callstacks from different threads
Change 3193168 on 2016/11/10 by Steve.Robb
TSparseArray now reserves space in reverse so that new elements get added to the front of the allocation rather than the back, which is better for memory traversal and meets expectations more closely.
Change 3193171 on 2016/11/10 by Steve.Robb
Easier debugging of FPendingRegistrantInfo map.
Change 3193188 on 2016/11/10 by Steve.Robb
TAutoPointer deprecated.
Change 3193796 on 2016/11/10 by Graeme.Thornton
Fix pak creation failure when no pak signing keys are supplied
Change 3194524 on 2016/11/11 by Graeme.Thornton
Another static analysis warning fix
Change 3195119 on 2016/11/11 by Steve.Robb
TAutoPtr deprecated.
Fixes to use of TAutoPtr with incompatible memory deallocations (TAutoPtr with FMemory::Malloc and new[]).
Some large headers moved into .cpp files.
Change 3196582 on 2016/11/14 by Gil.Gribb
UE4 - Changed a check to a warning related to detaching linekrs twice. Seen in nativized BP version of platformer game.
Change 3196878 on 2016/11/14 by Steve.Robb
TScopedPointer deprecated.
Change 3198061 on 2016/11/15 by Steve.Robb
Class array is no longer regenerated when saving UClasses.
Change 3198065 on 2016/11/15 by Robert.Manuszewski
Making AssembleReferenceTokenStream thread safe for blueprints loaded on the async loading thread.
Change 3198199 on 2016/11/15 by Robert.Manuszewski
Pak platform file will now only be used if pak files exist regardless of command line paraks like -pak, -singedpak and -signed.
Change 3199954 on 2016/11/16 by Graeme.Thornton
Removing USING_SIGNED_CONTENT
Change 3200221 on 2016/11/16 by Chris.Wood
CrashReportProcess code cleanup - removing unused using directives
Change 3200232 on 2016/11/16 by Chris.Wood
Multiple CrashReportProcess updates and improvements (CRP v1.2.6)
UE-36248 - CRP scalability: All bulk storage or shared data to S3 or suitable network drives
InvalidCrashReports now saved to S3 instead of local folder
Removed option tosync MinidumpDiagnostics from Perforce
Moved MinidumpDiagnostics from old Perforce synched location to its own folder in E:\Services (makes more sense with manual publishing)
Added improved logging to Slack with option to monitor MDD performance
Added hourly log folders to MDD logs
Added support for types of crashes we don't want to symbolicate (using it to skip callstack gen for hang detected ensures)
Change 3200382 on 2016/11/16 by Robert.Manuszewski
Async Loading code will now detach the linker when resetting async package loader to avoid situations when loading the same asset multiple times results in the following load request finding the old linker after the package has been loading but the async package hasn't been deleted yet (async package for the old request in limbo state but linker exists).
Change 3200562 on 2016/11/16 by Gil.Gribb
UE4 - Fixed rare issue with reloading nativized blueprints with the EDL and a minor simplication.
Change 3201093 on 2016/11/16 by Ben.Zeigler
#UE 38654 Fix EDL cooking to correctly search components created directly by UBlueprints, as well as the CDO components it already covered. Also explicitly mark subobject templates as editor only.
Fix issue where the AssetImportData associated with Blueprint-owned Curves was ending up in the cooked subobject template list. Stopped it from creating those objects, and mark the class editor only.
Change 3201736 on 2016/11/17 by Steve.Robb
Strtoi64 platform and TCString functions.
#fyi robert.manuszewski
Change 3201938 on 2016/11/17 by Ben.Woodhouse
Dummy integrate of the Square render version workaround (CL 3201913) with _accept target_ to prevent it being integrated to dev-core in future.
Commandline:
p4 integrate //Tasks/UE4/Dev-LoadTimes/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp@3201913,3201913 //UE4/Dev-Core/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp
#fyi robert.manuszewski
Change 3203757 on 2016/11/18 by Robert.Manuszewski
Removing debug code from async loading code.
Change 3203927 on 2016/11/18 by Robert.Manuszewski
Fixing comments in the async loading code.
Change 3204851 on 2016/11/18 by Steve.Robb
Metafunction for testing if a particular operator<< overload exists, e.g. THasInserterOperator<FArchive&, FMyType&>::Value.
Change 3204854 on 2016/11/18 by Steve.Robb
UEnumProperty.
Change 3205027 on 2016/11/18 by Ben.Zeigler
Add useful functions to FAssetPtr and TAssetSubclassOf that already existed on TAssetPtr
Add Get() to TSubclassOf so it matches our other wrappers
Fix TSubclassOf and TAssetSubclassOf to use the more efficient template method of checking class compatibility
Comment and template cleanups for AssetPtr, StringAssetReference, LazyPtr, and SubclassOf
Change 3206334 on 2016/11/21 by Ben.Zeigler
#UE-38773: Fix it so non-component template subobjects of CDOs are not included as creation dependencies for BP classes, also clean up GetPreloadDependencies as it was adding redundant and null entries
#UE-38799: Fix it so WidgetTrees don't get picked up as subobjects, and add ensure at cook time to find null outers that would crash at runtime. Make sure the instanced widget trees are transient.
Cook finishes but game is still crashing in some cases, so I might adjust this after other testing
Change 3206353 on 2016/11/21 by Ben.Zeigler
Fix EnumProperty to handle EDL preload dependencies properly
Change 3206625 on 2016/11/21 by Ben.Zeigler
Fix enum property crash at runtime by copying what array property does and making sure inner property is not transient
Change 3206937 on 2016/11/21 by Ben.Zeigler
#jira UE-38905 Fix it so enums inside arrays are migrated properly, the enum tag is lost so use the current one
Disable other nested enum migrations as they are unlikely to work. Array property tags need to be refactored to be safer
Correctly save enum tag for enum properties, it was being set but not serialized
Change 3207002 on 2016/11/21 by Ben.Zeigler
#jira UE-38799
Fix it so per-widget copy of widget tree and all widgets inside are properly transient, they were being cooked before but never accessed.
Fix case where non ClientOnly public objects nested instead ClientOnly objects would cook but fail to load, and add ensure to catch these cases in the future.
If the full outer chain isn't available, it can't be loaded anyway, and this finds issues at cook time instead of load time.
We should generally outlaw non-transient objects with transient outers, it does not do what people expect.
Change 3207032 on 2016/11/21 by Ben.Zeigler
#jira UE-38654 Re-Fix EDL cooking with SCS-added components. They used to have the DefaultSubObject flag but no longer do
[CL 3208270 by Ben Zeigler in Main branch]
2016-11-22 18:45:44 -05:00
|
|
|
#include "UniquePtr.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
DEFINE_LOG_CATEGORY(LogSockets);
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE( FSocketSubsystemModule, Sockets );
|
|
|
|
|
|
|
|
|
|
/** Each platform will implement these functions to construct/destroy socket implementations */
|
|
|
|
|
extern FName CreateSocketSubsystem( FSocketSubsystemModule& SocketSubsystemModule );
|
|
|
|
|
extern void DestroySocketSubsystem( FSocketSubsystemModule& SocketSubsystemModule );
|
|
|
|
|
|
|
|
|
|
/** Helper function to turn the friendly subsystem name into the module name */
|
|
|
|
|
static inline FName GetSocketModuleName(const FString& SubsystemName)
|
|
|
|
|
{
|
|
|
|
|
FName ModuleName;
|
|
|
|
|
FString SocketBaseName(TEXT("Sockets"));
|
|
|
|
|
|
|
|
|
|
if (!SubsystemName.StartsWith(SocketBaseName, ESearchCase::CaseSensitive))
|
|
|
|
|
{
|
|
|
|
|
ModuleName = FName(*(SocketBaseName + SubsystemName));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ModuleName = FName(*SubsystemName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ModuleName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Helper function that loads a given platform service module if it isn't already loaded
|
|
|
|
|
*
|
|
|
|
|
* @param SubsystemName Name of the requested platform service to load
|
|
|
|
|
* @return The module interface of the requested platform service, NULL if the service doesn't exist
|
|
|
|
|
*/
|
|
|
|
|
static TSharedPtr<IModuleInterface> LoadSubsystemModule(const FString& SubsystemName)
|
|
|
|
|
{
|
|
|
|
|
#if !UE_BUILD_SHIPPING && !UE_BUILD_SHIPPING_WITH_EDITOR
|
|
|
|
|
// Early out if we are overriding the module load
|
|
|
|
|
bool bAttemptLoadModule = !FParse::Param(FCommandLine::Get(), *FString::Printf(TEXT("no%s"), *SubsystemName));
|
|
|
|
|
if (bAttemptLoadModule)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
FName ModuleName;
|
|
|
|
|
FModuleManager& ModuleManager = FModuleManager::Get();
|
|
|
|
|
|
|
|
|
|
ModuleName = GetSocketModuleName(SubsystemName);
|
|
|
|
|
if (!ModuleManager.IsModuleLoaded(ModuleName))
|
|
|
|
|
{
|
|
|
|
|
// Attempt to load the module
|
|
|
|
|
ModuleManager.LoadModule(ModuleName);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-18 19:23:34 -04:00
|
|
|
return ModuleManager.GetModule(ModuleName);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Shutdown all registered subsystems
|
|
|
|
|
*/
|
|
|
|
|
void ISocketSubsystem::ShutdownAllSystems()
|
|
|
|
|
{
|
2014-04-23 18:43:57 -04:00
|
|
|
if (IsInGameThread() && FModuleManager::Get().IsModuleLoaded(TEXT("Sockets")) == true)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
// Unloading the Sockets module will call FSocketSubsystemModule::ShutdownSocketSubsystem()
|
|
|
|
|
const bool bIsShutdown = true;
|
|
|
|
|
FModuleManager::Get().UnloadModule(TEXT("Sockets"), bIsShutdown);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called right after the module DLL has been loaded and the module object has been created
|
|
|
|
|
* Overloaded to allow the default subsystem a chance to load
|
|
|
|
|
*/
|
|
|
|
|
void FSocketSubsystemModule::StartupModule()
|
|
|
|
|
{
|
|
|
|
|
FString InterfaceString;
|
|
|
|
|
|
|
|
|
|
// Initialize the platform defined socket subsystem first
|
|
|
|
|
DefaultSocketSubsystem = CreateSocketSubsystem( *this );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called before the module is unloaded, right before the module object is destroyed.
|
|
|
|
|
* Overloaded to shut down all loaded online subsystems
|
|
|
|
|
*/
|
|
|
|
|
void FSocketSubsystemModule::ShutdownModule()
|
|
|
|
|
{
|
|
|
|
|
ShutdownSocketSubsystem();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSocketSubsystemModule::ShutdownSocketSubsystem()
|
|
|
|
|
{
|
|
|
|
|
// Destroy the platform defined socket subsystem first
|
|
|
|
|
DestroySocketSubsystem( *this );
|
|
|
|
|
|
|
|
|
|
FModuleManager& ModuleManager = FModuleManager::Get();
|
|
|
|
|
// Unload all the supporting factories
|
|
|
|
|
for (TMap<FName, ISocketSubsystem*>::TIterator It(SocketSubsystems); It; ++It)
|
|
|
|
|
{
|
|
|
|
|
It.Value()->Shutdown();
|
|
|
|
|
// Unloading the module will do proper cleanup
|
|
|
|
|
FName ModuleName = GetSocketModuleName(It.Key().ToString());
|
|
|
|
|
|
|
|
|
|
const bool bIsShutdown = true;
|
|
|
|
|
ModuleManager.UnloadModule(ModuleName, bIsShutdown);
|
|
|
|
|
}
|
|
|
|
|
//ensure(SocketSubsystems.Num() == 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register a new socket subsystem interface with the base level factory provider
|
|
|
|
|
*
|
|
|
|
|
* @param FactoryName - name of subsystem as referenced by consumers
|
|
|
|
|
* @param Factory - instantiation of the socket subsystem interface, this will take ownership
|
|
|
|
|
* @param bMakeDefault - make this subsystem the default
|
|
|
|
|
*/
|
|
|
|
|
void FSocketSubsystemModule::RegisterSocketSubsystem(const FName FactoryName, ISocketSubsystem* Factory, bool bMakeDefault)
|
|
|
|
|
{
|
|
|
|
|
if (!SocketSubsystems.Contains(FactoryName))
|
|
|
|
|
{
|
|
|
|
|
SocketSubsystems.Add(FactoryName, Factory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bMakeDefault)
|
|
|
|
|
{
|
|
|
|
|
DefaultSocketSubsystem = FactoryName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Unregister an existing online subsystem interface from the base level factory provider
|
|
|
|
|
* @param FactoryName - name of subsystem as referenced by consumers
|
|
|
|
|
*/
|
|
|
|
|
void FSocketSubsystemModule::UnregisterSocketSubsystem(const FName FactoryName)
|
|
|
|
|
{
|
|
|
|
|
if (SocketSubsystems.Contains(FactoryName))
|
|
|
|
|
{
|
|
|
|
|
SocketSubsystems.Remove(FactoryName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Main entry point for accessing a socket subsystem by name
|
|
|
|
|
* Will load the appropriate module if the subsystem isn't currently loaded
|
|
|
|
|
* It's possible that the subsystem doesn't exist and therefore can return NULL
|
|
|
|
|
*
|
|
|
|
|
* @param SubsystemName - name of subsystem as referenced by consumers
|
|
|
|
|
* @return Requested socket subsystem, or NULL if that subsystem was unable to load or doesn't exist
|
|
|
|
|
*/
|
|
|
|
|
ISocketSubsystem* FSocketSubsystemModule::GetSocketSubsystem(const FName InSubsystemName)
|
|
|
|
|
{
|
|
|
|
|
FName SubsystemName = InSubsystemName;
|
|
|
|
|
if (SubsystemName == NAME_None)
|
|
|
|
|
{
|
|
|
|
|
SubsystemName = DefaultSocketSubsystem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ISocketSubsystem** SocketSubsystemFactory = SocketSubsystems.Find(SubsystemName);
|
|
|
|
|
if (SocketSubsystemFactory == NULL)
|
|
|
|
|
{
|
|
|
|
|
// Attempt to load the requested factory
|
|
|
|
|
TSharedPtr<IModuleInterface> NewModule = LoadSubsystemModule(SubsystemName.ToString());
|
|
|
|
|
if( NewModule.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
// If the module loaded successfully this should be non-NULL;
|
|
|
|
|
SocketSubsystemFactory = SocketSubsystems.Find(SubsystemName);
|
|
|
|
|
}
|
|
|
|
|
if (SocketSubsystemFactory == NULL)
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(LogSockets, Warning, TEXT("Unable to load SocketSubsystem module %s"), *InSubsystemName.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (SocketSubsystemFactory == NULL) ? NULL : *SocketSubsystemFactory;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////
|
|
|
|
|
// ISocketSubsystem
|
|
|
|
|
/////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ISocketSubsystem* ISocketSubsystem::Get(const FName& SubsystemName)
|
|
|
|
|
{
|
|
|
|
|
// wrap the platform file with a logger
|
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3208226)
#lockdown Nick.Penwarden
#rb None
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3173153 on 2016/10/25 by Graeme.Thornton
Pak signing changes
- Integrated into EDL loader
- Changed to not encrypt each CRC in the sig file, rather just store a single encryped signature of the entire sig file. Removes need to decrypt thousands of signatures at startup.
Change 3173531 on 2016/10/25 by Steven.Hutton
Removing unused j query packages.
Change 3174743 on 2016/10/26 by Gil.Gribb
UE4 - fixed COTF with EDL
Change 3177896 on 2016/10/28 by Steve.Robb
TSharedPtr and TSharedRef aliasing constructors.
Removal of static_asserts for TSharedPtr<UObject>.
Change 3180343 on 2016/10/31 by Steve.Robb
Reimplementation of changes from CL#s 3050329 and 3105715 that were lost in merges 3094597 and 3105741.
Change 3181382 on 2016/11/01 by Steve.Robb
Visual Studio debugger visualizers for delegates.
Change 3182738 on 2016/11/02 by Graeme.Thornton
Re-enable signed archive reader so non-pakpreacher based reads still get signature checked
Change 3183420 on 2016/11/02 by Steve.Robb
Fix to TIsZeroConstructType for TScriptDelegate.
Change 3184872 on 2016/11/03 by Robert.Manuszewski
Fixing memory stomps in SSL certificate initialization (found with mallocstomp)
Change 3184873 on 2016/11/03 by Robert.Manuszewski
Adding thread safety checks to async loading code
Change 3185535 on 2016/11/03 by Ben.Zeigler
Fix it so calling CreateDefaultSubobject with bTransient = true sets the object transient flag. This fixes EDL Crashes involving components.
Change 3186636 on 2016/11/04 by Graeme.Thornton
AES encryption integrated into EDL system
Pak signing and AES encryption now configurable by ini files rather than magical text files
Change 3186637 on 2016/11/04 by Graeme.Thornton
Configured pak signing and encryption in ShooterGame for reference
Change 3186639 on 2016/11/04 by Graeme.Thornton
Encryption changes for Orion
* Move pak signing keys into new INI format
* Add AES key and enable INI file encryption
Change 3186661 on 2016/11/04 by Graeme.Thornton
Change unrealpak command line params to accept AES key as a separete parameter
Change 3186670 on 2016/11/04 by Robert.Manuszewski
Adding a null check before using a package pointer in Linker code
#jira UE-38237
Change 3186775 on 2016/11/04 by Graeme.Thornton
Fix UBT defines that come in as quoted strings, losing the quotes when passed to the compiler
- PS4 and Mac fixes. Other platforms might need fixing too!
Change 3186823 on 2016/11/04 by Graeme.Thornton
Fixed an incorrect size check in the EDL pak signing code
Change 3186925 on 2016/11/04 by Graeme.Thornton
Allow UnrealPak to read encryption settings from project ini files
Change 3189885 on 2016/11/08 by Graeme.Thornton
Static analysis warning fix
Change 3190015 on 2016/11/08 by Robert.Manuszewski
Thread safety fix for UBlueprintGeneratedClass::PostLoadDefaultObject while UBlueprintGeneratedClass::SerializeDefaultObject runs on the async loading thread
Change 3190253 on 2016/11/08 by Chris.Wood
Improved MDD performance for on the CR server.
[UE-37566] - Improve MDD performance on CR server
Blocked MDD init'ing the crash handling code as it isn't desirable on the server.
Removed redundant call to SetSymbolPathsFromModules() from CrashDebugHelper.
Change 3192993 on 2016/11/10 by Robert.Manuszewski
Thread Heartbeat will no longer report the same hang multiple times.
Change 3193111 on 2016/11/10 by Robert.Manuszewski
Minor change in the condition that detects the same hangs - allow the same callstacks from different threads
Change 3193168 on 2016/11/10 by Steve.Robb
TSparseArray now reserves space in reverse so that new elements get added to the front of the allocation rather than the back, which is better for memory traversal and meets expectations more closely.
Change 3193171 on 2016/11/10 by Steve.Robb
Easier debugging of FPendingRegistrantInfo map.
Change 3193188 on 2016/11/10 by Steve.Robb
TAutoPointer deprecated.
Change 3193796 on 2016/11/10 by Graeme.Thornton
Fix pak creation failure when no pak signing keys are supplied
Change 3194524 on 2016/11/11 by Graeme.Thornton
Another static analysis warning fix
Change 3195119 on 2016/11/11 by Steve.Robb
TAutoPtr deprecated.
Fixes to use of TAutoPtr with incompatible memory deallocations (TAutoPtr with FMemory::Malloc and new[]).
Some large headers moved into .cpp files.
Change 3196582 on 2016/11/14 by Gil.Gribb
UE4 - Changed a check to a warning related to detaching linekrs twice. Seen in nativized BP version of platformer game.
Change 3196878 on 2016/11/14 by Steve.Robb
TScopedPointer deprecated.
Change 3198061 on 2016/11/15 by Steve.Robb
Class array is no longer regenerated when saving UClasses.
Change 3198065 on 2016/11/15 by Robert.Manuszewski
Making AssembleReferenceTokenStream thread safe for blueprints loaded on the async loading thread.
Change 3198199 on 2016/11/15 by Robert.Manuszewski
Pak platform file will now only be used if pak files exist regardless of command line paraks like -pak, -singedpak and -signed.
Change 3199954 on 2016/11/16 by Graeme.Thornton
Removing USING_SIGNED_CONTENT
Change 3200221 on 2016/11/16 by Chris.Wood
CrashReportProcess code cleanup - removing unused using directives
Change 3200232 on 2016/11/16 by Chris.Wood
Multiple CrashReportProcess updates and improvements (CRP v1.2.6)
UE-36248 - CRP scalability: All bulk storage or shared data to S3 or suitable network drives
InvalidCrashReports now saved to S3 instead of local folder
Removed option tosync MinidumpDiagnostics from Perforce
Moved MinidumpDiagnostics from old Perforce synched location to its own folder in E:\Services (makes more sense with manual publishing)
Added improved logging to Slack with option to monitor MDD performance
Added hourly log folders to MDD logs
Added support for types of crashes we don't want to symbolicate (using it to skip callstack gen for hang detected ensures)
Change 3200382 on 2016/11/16 by Robert.Manuszewski
Async Loading code will now detach the linker when resetting async package loader to avoid situations when loading the same asset multiple times results in the following load request finding the old linker after the package has been loading but the async package hasn't been deleted yet (async package for the old request in limbo state but linker exists).
Change 3200562 on 2016/11/16 by Gil.Gribb
UE4 - Fixed rare issue with reloading nativized blueprints with the EDL and a minor simplication.
Change 3201093 on 2016/11/16 by Ben.Zeigler
#UE 38654 Fix EDL cooking to correctly search components created directly by UBlueprints, as well as the CDO components it already covered. Also explicitly mark subobject templates as editor only.
Fix issue where the AssetImportData associated with Blueprint-owned Curves was ending up in the cooked subobject template list. Stopped it from creating those objects, and mark the class editor only.
Change 3201736 on 2016/11/17 by Steve.Robb
Strtoi64 platform and TCString functions.
#fyi robert.manuszewski
Change 3201938 on 2016/11/17 by Ben.Woodhouse
Dummy integrate of the Square render version workaround (CL 3201913) with _accept target_ to prevent it being integrated to dev-core in future.
Commandline:
p4 integrate //Tasks/UE4/Dev-LoadTimes/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp@3201913,3201913 //UE4/Dev-Core/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp
#fyi robert.manuszewski
Change 3203757 on 2016/11/18 by Robert.Manuszewski
Removing debug code from async loading code.
Change 3203927 on 2016/11/18 by Robert.Manuszewski
Fixing comments in the async loading code.
Change 3204851 on 2016/11/18 by Steve.Robb
Metafunction for testing if a particular operator<< overload exists, e.g. THasInserterOperator<FArchive&, FMyType&>::Value.
Change 3204854 on 2016/11/18 by Steve.Robb
UEnumProperty.
Change 3205027 on 2016/11/18 by Ben.Zeigler
Add useful functions to FAssetPtr and TAssetSubclassOf that already existed on TAssetPtr
Add Get() to TSubclassOf so it matches our other wrappers
Fix TSubclassOf and TAssetSubclassOf to use the more efficient template method of checking class compatibility
Comment and template cleanups for AssetPtr, StringAssetReference, LazyPtr, and SubclassOf
Change 3206334 on 2016/11/21 by Ben.Zeigler
#UE-38773: Fix it so non-component template subobjects of CDOs are not included as creation dependencies for BP classes, also clean up GetPreloadDependencies as it was adding redundant and null entries
#UE-38799: Fix it so WidgetTrees don't get picked up as subobjects, and add ensure at cook time to find null outers that would crash at runtime. Make sure the instanced widget trees are transient.
Cook finishes but game is still crashing in some cases, so I might adjust this after other testing
Change 3206353 on 2016/11/21 by Ben.Zeigler
Fix EnumProperty to handle EDL preload dependencies properly
Change 3206625 on 2016/11/21 by Ben.Zeigler
Fix enum property crash at runtime by copying what array property does and making sure inner property is not transient
Change 3206937 on 2016/11/21 by Ben.Zeigler
#jira UE-38905 Fix it so enums inside arrays are migrated properly, the enum tag is lost so use the current one
Disable other nested enum migrations as they are unlikely to work. Array property tags need to be refactored to be safer
Correctly save enum tag for enum properties, it was being set but not serialized
Change 3207002 on 2016/11/21 by Ben.Zeigler
#jira UE-38799
Fix it so per-widget copy of widget tree and all widgets inside are properly transient, they were being cooked before but never accessed.
Fix case where non ClientOnly public objects nested instead ClientOnly objects would cook but fail to load, and add ensure to catch these cases in the future.
If the full outer chain isn't available, it can't be loaded anyway, and this finds issues at cook time instead of load time.
We should generally outlaw non-transient objects with transient outers, it does not do what people expect.
Change 3207032 on 2016/11/21 by Ben.Zeigler
#jira UE-38654 Re-Fix EDL cooking with SCS-added components. They used to have the DefaultSubObject flag but no longer do
[CL 3208270 by Ben Zeigler in Main branch]
2016-11-22 18:45:44 -05:00
|
|
|
// static TUniquePtr<FLoggedPlatformFile> AutoDestroyLog;
|
|
|
|
|
// AutoDestroyLog = MakeUnique<FLoggedPlatformFile>(*CurrentPlatformFile);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
struct FStatic
|
|
|
|
|
{
|
|
|
|
|
FSocketSubsystemModule& SSSModule;
|
|
|
|
|
|
|
|
|
|
FStatic()
|
|
|
|
|
: SSSModule( FModuleManager::LoadModuleChecked<FSocketSubsystemModule>("Sockets") )
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
~FStatic()
|
|
|
|
|
{
|
|
|
|
|
ISocketSubsystem::ShutdownAllSystems();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static FStatic StaticSockets;
|
|
|
|
|
return StaticSockets.SSSModule.GetSocketSubsystem(SubsystemName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32 ISocketSubsystem::BindNextPort(FSocket* Socket, FInternetAddr& Addr, int32 PortCount, int32 PortIncrement)
|
|
|
|
|
{
|
|
|
|
|
// go until we reach the limit (or we succeed)
|
|
|
|
|
for (int32 Index = 0; Index < PortCount; Index++)
|
|
|
|
|
{
|
|
|
|
|
// try to bind to the current port
|
|
|
|
|
if (Socket->Bind(Addr) == true)
|
|
|
|
|
{
|
|
|
|
|
// if it succeeded, return the port
|
|
|
|
|
if (Addr.GetPort() != 0)
|
|
|
|
|
{
|
|
|
|
|
return Addr.GetPort();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return Socket->GetPortNo();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if the address had no port, we are done
|
|
|
|
|
if( Addr.GetPort() == 0 )
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// increment to the next port, and loop!
|
|
|
|
|
Addr.SetPort(Addr.GetPort() + PortIncrement);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedRef<FInternetAddr> ISocketSubsystem::GetLocalBindAddr(FOutputDevice& Out)
|
|
|
|
|
{
|
|
|
|
|
bool bCanBindAll;
|
|
|
|
|
// look up the local host address
|
|
|
|
|
TSharedRef<FInternetAddr> BindAddr = GetLocalHostAddr(Out, bCanBindAll);
|
|
|
|
|
|
|
|
|
|
// If we can bind to all addresses, return 0.0.0.0
|
|
|
|
|
if (bCanBindAll)
|
|
|
|
|
{
|
|
|
|
|
BindAddr->SetAnyAddress();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// return it
|
|
|
|
|
return BindAddr;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FResolveInfo* ISocketSubsystem::GetHostByName(const ANSICHAR* HostName)
|
|
|
|
|
{
|
|
|
|
|
FResolveInfo* Result = NULL;
|
|
|
|
|
TSharedPtr<FInternetAddr> Addr;
|
|
|
|
|
// See if we have it cached or not
|
|
|
|
|
if (GetHostByNameFromCache(HostName, Addr))
|
|
|
|
|
{
|
Copying //UE4/Dev-Platform to //UE4/Dev-Main (Source: //UE4/Dev-Platform @ 3233741)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
[NOTE: Switch changes have been removed from this list, and will be in a comment in //UE4/Main/Engine/Build/Switch/SwitchChanges.txt]
Change 3207431 on 2016/11/22 by Keith.Judge
Make VectorSign on XB1 match (incorrect) SSE implementation rather than the reference FPU implementation. Too many things seem to rely on this to change the default behaviour now.
#jira UE-36921
#jira UE-38560
Change 3208206 on 2016/11/22 by Josh.Adams
- Changed plugins upgrading a content-only project to code-based, even if the modules inside aren't compiled for the current platform. There are issues with runtime not knowing the plugin isn't needed. The proper way is to non-whitelist the platform in the project, not in the modules, if you don't want it to upgrade the project. See the comments in this change for more info.
#jira UE-38929
Change 3209137 on 2016/11/23 by Alicia.Cano
Add a check to iOS tool chain for exception flag
#jira UE-36528
#ios
Change 3209296 on 2016/11/23 by Ben.Marsh
Always send build failure notifications in Dev-Platform to Will.Fissler@epicgames.com and Owen.Stupka@epicgames.com
Change 3211316 on 2016/11/28 by Joe.Barnes
Fix some typos
Change 3211318 on 2016/11/28 by Joe.Barnes
Fix wrong function name in header file. Didn't match actual function name in RenderingThread.cpp
Change 3213227 on 2016/11/29 by Dmitry.Rekman
Add -fPIC to libwebsockets on Linux.
Change 3213463 on 2016/11/29 by Nick.Shin
helper build scripts for CentOS 7 Linux (via Docker)
LINUX: pull source and compile: zlib openssl libcurl & libwebsockets
using [ glibc 2.17 ] & [ gcc 4.8.5 ]
Docker creates an image (that is essentially a CentOS box) and runs the build script within that environment (called a container). think of this as a VM -- but waaaaaaay better -- nothing is virtualized -- it's all on the metal.
#jira UEPLAT-1246 - Update libWebsockets
#jira UEPLAT-1221 - update websocket library
#jira UEPLAT-1203 - Add Linux library for libwebsockets
#jira UEPLAT-1204 - Rebuild libwebsockets with SSL
Change 3213939 on 2016/11/29 by Michael.Trepka
Ignore parent widget's geometry scale when showing a popup menu in a separate window
#jira UE-38706
Change 3215583 on 2016/11/30 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3216345 on 2016/11/30 by Josh.Adams
Better fix for poison proxy fix
Change 3217106 on 2016/12/01 by Michael.Trepka
Fixed a crash caused by an attempt to use FPlayWorldCommands::GlobalPlayWorldActions before it's initialized when showing suppressable warning dialogs in UEditorEngine::UpdateAutoLoadProject()
#jira UE-38816
Change 3217223 on 2016/12/01 by Josh.Adams
- Fixed some TEXT macro warnings that crept in from IWYU changes
Change 3217253 on 2016/12/01 by Dmitry.Rekman
Linux: fix GL crash (UE-17649).
- Making sure all streams are set up. Fix by Cengiz.
Change 3217473 on 2016/12/01 by Daniel.Lamb
Fixed a case when we load a map it might not have it's sublevels loaded because it's not treated like a map.
#test cook run QAGame
Change 3217588 on 2016/12/01 by Peter.Sauerbrei
Pull in IPv6 fix
Change 3217654 on 2016/12/01 by Michael.Trepka
Changed the Mac-specific high DPI code to use system backingScaleFactor only if NSHighResolutionCapable in Info.plist is set to true. This solves the problem with macOS Sierra giving us actual backingScaleFactor values even in low DPI modes.
Change 3217873 on 2016/12/01 by Josh.Adams
- Added some logging to a tvOS assert, since debugging it right away is tricky
Change 3218097 on 2016/12/01 by Josh.Adams
- Fixed up the Switch MediaFramework, making editor better, etc
- ALso changed PS4 and Xbox plugins to be enabled by default by having two entries in the plugin module for the Factory modules (an editor only entry, and a platform specific runtime entry... this will make it so that UE4Game.exe won't ahve it compiled in, even with it enabled by default)
Change 3218133 on 2016/12/01 by Dmitry.Rekman
Linux: report server hangs by crashing the hung thread (UE-39164).
Change 3218512 on 2016/12/01 by Josh.Adams
- Made the MfMedia plugin to be distributable in public builds, since it's for Windows and Xbox
Change 3219804 on 2016/12/02 by Dmitry.Rekman
Linux: fix project settings crash (UE-38800).
- Also submitted as a pull request #2945.
Change 3220027 on 2016/12/02 by Nick.Shin
plow all physx libs into build
NOTE: most browsers will not function
- chrome and firefox nightly only works
checking this in as per email
#jira UE-38323 VehicleTemplate Vehicle does not move in HTML5
Change 3221620 on 2016/12/05 by Joe.Barnes
UE-37275 - Temporary workaround for log lines losing carriage returns. Add's a \n when outputting lines if there isn't one at the end.
Change 3221689 on 2016/12/05 by Dmitry.Rekman
Attempt to change/rename.
Change 3221700 on 2016/12/05 by Dmitry.Rekman
Another attempt to change renamed file (from Linux).
Change 3221731 on 2016/12/05 by Michael.Trepka
Added missing initialization for FAvfVideoSampler::MetalTextureCache
#jira UE-38689
Change 3221792 on 2016/12/05 by Michael.Trepka
Fixed a crash in FMetalDynamicRHI::RHIAsyncReallocateTexture2D for PVRTC2 textures
Change 3222675 on 2016/12/05 by Josh.Adams
- Removed some resolution setting junk that was recently added to PlatformerGame - settings resolution on AppleTV is bad, it doesn't need to change resolution on non-desktop platforms
#jira UE-39188
Change 3223546 on 2016/12/06 by Brent.Pease
+ Properly set and use the realtime compression for ios.
+ Reduce unused memory on ios from the precached first buffer
+ Fix a resource tracking issue that was causing a double free on the sound buffer
Change 3223785 on 2016/12/06 by Brent.Pease
+ Add support for iPhone7 (implemented by peter.sauerbrei, merged in from WEX)
#jira ue-38701
Change 3224314 on 2016/12/06 by Chris.Babcock
Send OnTargetPlatformChangedSupportedFormats when format changed in Android project settings in editor
#jira UE-38361
#ue4
#android
Change 3225367 on 2016/12/07 by Josh.Adams
- Added FKey::Virtual_Accept and Virtual_Back, which will map to FaceButton Right/Down appropriately based on platform (Switch swaps them)
- Made changes to ShooterGame and VehicleGame for Virtual_Accept and Back
- Added some icons for ShooterGame, and changed some text blocks to SRichTextBlock to insert the icons
Change 3225426 on 2016/12/07 by Chris.Babcock
Add missing Android UPL file for binary builds
#jira UE-39420
#ue4
#android
Change 3225471 on 2016/12/07 by Dmitry.Rekman
Update all platforms to C++14.
Change 3225525 on 2016/12/07 by Nick.Shin
Cook-On-The-Fly for HTML5
- re-enabled: ENetworkFileServerProtocol::NFSP_Http
- cleaned up port numbers used with cook-on-the-fly situations
- fixed null_ptr in NetworkFileServerHttp.cpp
- fix CORS issue with HTML5LaunchHelper (not really needed -- but doesn't hurt to have it in the test server)
- finally, the core of the jira issue:
o fix serialization bug: do not append zero sized data
o fix de-serialization bug: removed double insertion of packet "Marker and Size" header
#jira UE-38281 Quicklaunch UFE HTML5 fails to get COTF Header Size
Change 3225690 on 2016/12/07 by Dmitry.Rekman
Linux: improvements in touch support.
- Multiple fingers.
- Filtering out "moved" events from the same location.
- Consistent logging.
(Edigrating 3225194 from Wombat to Dev-Platform)
Change 3225868 on 2016/12/07 by Josh.Stoddard
Gracefully handle delete without matching new on iOS & Mac
#jira UE-39395
Change 3226159 on 2016/12/07 by Omar.Rodriguez
UEPLAT-1423 WEX: Improved virtual keyboard for Android
* Renamed old virtual keyboard functions by adding "Dialog" suffix to the name
* Added new virtual keyboard functions that use InputMethodManager to show/hide keyboard
* Hide the virtual keyboard, if shown, onPause
* Slate edit box decides which functions to call for showing/hiding keyboard
- eventually will be based on command line parameter like in IOS
#jira UEPLAT-1423
Change 3226167 on 2016/12/07 by Dmitry.Rekman
Allow running as root on ARM.
(Edigrating 3204974 to Dev-Platform)
Change 3226168 on 2016/12/07 by Dmitry.Rekman
Print current CVar value when denying an override.
(Based on CL 3205476).
Change 3226169 on 2016/12/07 by Dmitry.Rekman
Allow enabling sound (if disabled by default).
(Based on CL 3205505)
Change 3226171 on 2016/12/07 by Dmitry.Rekman
Allow running from symlinks.
(Edigrating 3205518 to Dev-Platform).
Change 3226174 on 2016/12/07 by Dmitry.Rekman
Linux: do not init SDL audio (we do not use it anyway).
(Based on CL 3205505).
Change 3226327 on 2016/12/07 by Nick.Shin
fix CIS warning
#jira UE-38281 Quicklaunch UFE HTML5 fails to get COTF Header Size
Change 3226506 on 2016/12/08 by Dmitry.Rekman
Fix one more case-sensitive misspelling (UE-39030).
- Submitted as part of PR #2976.
Change 3226542 on 2016/12/08 by Dmitry.Rekman
Linux: fix weirdness with tesselation in GL4 (UE-32865).
- Workaround by CengizT. Proper fix tracked as UE-39489.
Change 3226570 on 2016/12/08 by Dmitry.Rekman
Fix for ar failing due to too long command line (UE-39009).
- Based on PR #2973.
Change 3226575 on 2016/12/08 by Dmitry.Rekman
Add build-essential to dependencies (UE-39053).
- PR #2981 contributed by cpyarger.
Change 3227129 on 2016/12/08 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Fixed up a deferred GL error as well
Fixed some copyrights of files not in main
Change 3227260 on 2016/12/08 by Omar.Rodriguez
UE-39140 Projects with iCloud are failing provisioning check when code signing.
* Set default value of bEnableCloudKitSupport to False
* Set value of get-task-allow to true only on non-distribution builds
* Only write out the entitlements file if changes have been made
#jira UE-39140
Change 3229312 on 2016/12/09 by Dmitry.Rekman
Fix missing responses (UE-39572).
- Proper implementation of UE-39009.
Change 3230849 on 2016/12/12 by Dmitry.Rekman
Linux: fixed Android packaging (UE-39635).
- Misspelled case; fixed by JohnHenry Carawon.
#jira UE-39635
Change 3231591 on 2016/12/12 by Peter.Sauerbrei
fix for splash screen not being turned off by default
#jira UE-39591
Change 3231880 on 2016/12/12 by Josh.Adams
- Fixing StaticAnalysis warnings, but -enablecodeanalysis stopped working for some reason, and the /Zm thing has hit me really hard, so this is a hopeful checkin for static analysis issues
#jira UE-39680
Change 3232816 on 2016/12/13 by Dmitry.Rekman
Linux: fix for CEF (UE-39682)
- Fix by Cengiz.Terzibas.
Change 3232873 on 2016/12/13 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3232933 on 2016/12/13 by Josh.Adams
- Missed the files that were needed to fix up after merge from main, but didn';t come from main
Change 3233066 on 2016/12/13 by Ben.Marsh
UBT: Ignore exception if PATH variable contains invalid characters when looking for XGE.
Change 3233512 on 2016/12/13 by Ben.Marsh
Fix static analysis warnings.
[CL 3233813 by Josh Adams in Main branch]
2016-12-13 19:47:16 -05:00
|
|
|
Result = CreateResolveInfoCached(Addr);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Create an async resolve info
|
|
|
|
|
FResolveInfoAsync* AsyncResolve = new FResolveInfoAsync(HostName);
|
|
|
|
|
AsyncResolve->StartAsyncTask();
|
|
|
|
|
Result = AsyncResolve;
|
|
|
|
|
}
|
|
|
|
|
return Result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedRef<FInternetAddr> ISocketSubsystem::GetLocalHostAddr(FOutputDevice& Out, bool& bCanBindAll)
|
|
|
|
|
{
|
|
|
|
|
TSharedRef<FInternetAddr> HostAddr = CreateInternetAddr();
|
|
|
|
|
HostAddr->SetAnyAddress();
|
|
|
|
|
|
|
|
|
|
bCanBindAll = false;
|
|
|
|
|
|
|
|
|
|
TCHAR Home[256]=TEXT("");
|
|
|
|
|
FString HostName;
|
|
|
|
|
if (GetHostName(HostName) == false)
|
|
|
|
|
{
|
|
|
|
|
Out.Logf(TEXT("%s: gethostname failed (%s)"), GetSocketAPIName(), GetSocketError());
|
|
|
|
|
}
|
|
|
|
|
if (FParse::Value(FCommandLine::Get(),TEXT("MULTIHOME="),Home,ARRAY_COUNT(Home)))
|
|
|
|
|
{
|
|
|
|
|
bool bIsValid = false;
|
|
|
|
|
HostAddr->SetIp(Home,bIsValid);
|
|
|
|
|
if (Home == NULL || bIsValid == false)
|
|
|
|
|
{
|
|
|
|
|
Out.Logf( TEXT("Invalid multihome IP address %s"), Home );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-11-24 17:40:21 -05:00
|
|
|
// Failing to find the host is not considered an error and we just bind to any address
|
|
|
|
|
ESocketErrors FindHostResult = GetHostByName(TCHAR_TO_ANSI(*HostName), *HostAddr);
|
2015-03-02 16:50:10 -05:00
|
|
|
if (FindHostResult == SE_NO_ERROR || FindHostResult == SE_HOST_NOT_FOUND
|
|
|
|
|
|| FindHostResult == SE_EWOULDBLOCK || FindHostResult == SE_TRY_AGAIN)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
if( !FParse::Param(FCommandLine::Get(),TEXT("PRIMARYNET")) )
|
|
|
|
|
{
|
|
|
|
|
bCanBindAll = true;
|
|
|
|
|
}
|
|
|
|
|
static bool First;
|
|
|
|
|
if( !First )
|
|
|
|
|
{
|
|
|
|
|
First = true;
|
|
|
|
|
UE_LOG(LogInit, Log, TEXT("%s: I am %s (%s)"), GetSocketAPIName(), *HostName, *HostAddr->ToString(true) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-03-02 16:50:10 -05:00
|
|
|
Out.Logf(TEXT("GetHostByName failed (%s)"), GetSocketError(FindHostResult));
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// return the newly created address
|
|
|
|
|
return HostAddr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool ISocketSubsystem::GetHostByNameFromCache(const ANSICHAR* HostName, TSharedPtr<FInternetAddr>& Addr)
|
|
|
|
|
{
|
|
|
|
|
// Lock for thread safety
|
|
|
|
|
FScopeLock sl(&HostNameCacheSync);
|
|
|
|
|
// Now search for the entry
|
|
|
|
|
TSharedPtr<FInternetAddr>* FoundAddr = HostNameCache.Find(FString(HostName));
|
|
|
|
|
if (FoundAddr)
|
|
|
|
|
{
|
|
|
|
|
Addr = *FoundAddr;
|
|
|
|
|
}
|
|
|
|
|
return FoundAddr != NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ISocketSubsystem::AddHostNameToCache(const ANSICHAR* HostName, TSharedPtr<FInternetAddr> Addr)
|
|
|
|
|
{
|
|
|
|
|
// Lock for thread safety
|
|
|
|
|
FScopeLock sl(&HostNameCacheSync);
|
|
|
|
|
HostNameCache.Add(FString(HostName), Addr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ISocketSubsystem::RemoveHostNameFromCache(const ANSICHAR* HostName)
|
|
|
|
|
{
|
|
|
|
|
// Lock for thread safety
|
|
|
|
|
FScopeLock sl(&HostNameCacheSync);
|
|
|
|
|
HostNameCache.Remove(FString(HostName));
|
|
|
|
|
}
|
|
|
|
|
|
Copying //UE4/Dev-Platform to //UE4/Dev-Main (Source: //UE4/Dev-Platform @ 3233741)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
[NOTE: Switch changes have been removed from this list, and will be in a comment in //UE4/Main/Engine/Build/Switch/SwitchChanges.txt]
Change 3207431 on 2016/11/22 by Keith.Judge
Make VectorSign on XB1 match (incorrect) SSE implementation rather than the reference FPU implementation. Too many things seem to rely on this to change the default behaviour now.
#jira UE-36921
#jira UE-38560
Change 3208206 on 2016/11/22 by Josh.Adams
- Changed plugins upgrading a content-only project to code-based, even if the modules inside aren't compiled for the current platform. There are issues with runtime not knowing the plugin isn't needed. The proper way is to non-whitelist the platform in the project, not in the modules, if you don't want it to upgrade the project. See the comments in this change for more info.
#jira UE-38929
Change 3209137 on 2016/11/23 by Alicia.Cano
Add a check to iOS tool chain for exception flag
#jira UE-36528
#ios
Change 3209296 on 2016/11/23 by Ben.Marsh
Always send build failure notifications in Dev-Platform to Will.Fissler@epicgames.com and Owen.Stupka@epicgames.com
Change 3211316 on 2016/11/28 by Joe.Barnes
Fix some typos
Change 3211318 on 2016/11/28 by Joe.Barnes
Fix wrong function name in header file. Didn't match actual function name in RenderingThread.cpp
Change 3213227 on 2016/11/29 by Dmitry.Rekman
Add -fPIC to libwebsockets on Linux.
Change 3213463 on 2016/11/29 by Nick.Shin
helper build scripts for CentOS 7 Linux (via Docker)
LINUX: pull source and compile: zlib openssl libcurl & libwebsockets
using [ glibc 2.17 ] & [ gcc 4.8.5 ]
Docker creates an image (that is essentially a CentOS box) and runs the build script within that environment (called a container). think of this as a VM -- but waaaaaaay better -- nothing is virtualized -- it's all on the metal.
#jira UEPLAT-1246 - Update libWebsockets
#jira UEPLAT-1221 - update websocket library
#jira UEPLAT-1203 - Add Linux library for libwebsockets
#jira UEPLAT-1204 - Rebuild libwebsockets with SSL
Change 3213939 on 2016/11/29 by Michael.Trepka
Ignore parent widget's geometry scale when showing a popup menu in a separate window
#jira UE-38706
Change 3215583 on 2016/11/30 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3216345 on 2016/11/30 by Josh.Adams
Better fix for poison proxy fix
Change 3217106 on 2016/12/01 by Michael.Trepka
Fixed a crash caused by an attempt to use FPlayWorldCommands::GlobalPlayWorldActions before it's initialized when showing suppressable warning dialogs in UEditorEngine::UpdateAutoLoadProject()
#jira UE-38816
Change 3217223 on 2016/12/01 by Josh.Adams
- Fixed some TEXT macro warnings that crept in from IWYU changes
Change 3217253 on 2016/12/01 by Dmitry.Rekman
Linux: fix GL crash (UE-17649).
- Making sure all streams are set up. Fix by Cengiz.
Change 3217473 on 2016/12/01 by Daniel.Lamb
Fixed a case when we load a map it might not have it's sublevels loaded because it's not treated like a map.
#test cook run QAGame
Change 3217588 on 2016/12/01 by Peter.Sauerbrei
Pull in IPv6 fix
Change 3217654 on 2016/12/01 by Michael.Trepka
Changed the Mac-specific high DPI code to use system backingScaleFactor only if NSHighResolutionCapable in Info.plist is set to true. This solves the problem with macOS Sierra giving us actual backingScaleFactor values even in low DPI modes.
Change 3217873 on 2016/12/01 by Josh.Adams
- Added some logging to a tvOS assert, since debugging it right away is tricky
Change 3218097 on 2016/12/01 by Josh.Adams
- Fixed up the Switch MediaFramework, making editor better, etc
- ALso changed PS4 and Xbox plugins to be enabled by default by having two entries in the plugin module for the Factory modules (an editor only entry, and a platform specific runtime entry... this will make it so that UE4Game.exe won't ahve it compiled in, even with it enabled by default)
Change 3218133 on 2016/12/01 by Dmitry.Rekman
Linux: report server hangs by crashing the hung thread (UE-39164).
Change 3218512 on 2016/12/01 by Josh.Adams
- Made the MfMedia plugin to be distributable in public builds, since it's for Windows and Xbox
Change 3219804 on 2016/12/02 by Dmitry.Rekman
Linux: fix project settings crash (UE-38800).
- Also submitted as a pull request #2945.
Change 3220027 on 2016/12/02 by Nick.Shin
plow all physx libs into build
NOTE: most browsers will not function
- chrome and firefox nightly only works
checking this in as per email
#jira UE-38323 VehicleTemplate Vehicle does not move in HTML5
Change 3221620 on 2016/12/05 by Joe.Barnes
UE-37275 - Temporary workaround for log lines losing carriage returns. Add's a \n when outputting lines if there isn't one at the end.
Change 3221689 on 2016/12/05 by Dmitry.Rekman
Attempt to change/rename.
Change 3221700 on 2016/12/05 by Dmitry.Rekman
Another attempt to change renamed file (from Linux).
Change 3221731 on 2016/12/05 by Michael.Trepka
Added missing initialization for FAvfVideoSampler::MetalTextureCache
#jira UE-38689
Change 3221792 on 2016/12/05 by Michael.Trepka
Fixed a crash in FMetalDynamicRHI::RHIAsyncReallocateTexture2D for PVRTC2 textures
Change 3222675 on 2016/12/05 by Josh.Adams
- Removed some resolution setting junk that was recently added to PlatformerGame - settings resolution on AppleTV is bad, it doesn't need to change resolution on non-desktop platforms
#jira UE-39188
Change 3223546 on 2016/12/06 by Brent.Pease
+ Properly set and use the realtime compression for ios.
+ Reduce unused memory on ios from the precached first buffer
+ Fix a resource tracking issue that was causing a double free on the sound buffer
Change 3223785 on 2016/12/06 by Brent.Pease
+ Add support for iPhone7 (implemented by peter.sauerbrei, merged in from WEX)
#jira ue-38701
Change 3224314 on 2016/12/06 by Chris.Babcock
Send OnTargetPlatformChangedSupportedFormats when format changed in Android project settings in editor
#jira UE-38361
#ue4
#android
Change 3225367 on 2016/12/07 by Josh.Adams
- Added FKey::Virtual_Accept and Virtual_Back, which will map to FaceButton Right/Down appropriately based on platform (Switch swaps them)
- Made changes to ShooterGame and VehicleGame for Virtual_Accept and Back
- Added some icons for ShooterGame, and changed some text blocks to SRichTextBlock to insert the icons
Change 3225426 on 2016/12/07 by Chris.Babcock
Add missing Android UPL file for binary builds
#jira UE-39420
#ue4
#android
Change 3225471 on 2016/12/07 by Dmitry.Rekman
Update all platforms to C++14.
Change 3225525 on 2016/12/07 by Nick.Shin
Cook-On-The-Fly for HTML5
- re-enabled: ENetworkFileServerProtocol::NFSP_Http
- cleaned up port numbers used with cook-on-the-fly situations
- fixed null_ptr in NetworkFileServerHttp.cpp
- fix CORS issue with HTML5LaunchHelper (not really needed -- but doesn't hurt to have it in the test server)
- finally, the core of the jira issue:
o fix serialization bug: do not append zero sized data
o fix de-serialization bug: removed double insertion of packet "Marker and Size" header
#jira UE-38281 Quicklaunch UFE HTML5 fails to get COTF Header Size
Change 3225690 on 2016/12/07 by Dmitry.Rekman
Linux: improvements in touch support.
- Multiple fingers.
- Filtering out "moved" events from the same location.
- Consistent logging.
(Edigrating 3225194 from Wombat to Dev-Platform)
Change 3225868 on 2016/12/07 by Josh.Stoddard
Gracefully handle delete without matching new on iOS & Mac
#jira UE-39395
Change 3226159 on 2016/12/07 by Omar.Rodriguez
UEPLAT-1423 WEX: Improved virtual keyboard for Android
* Renamed old virtual keyboard functions by adding "Dialog" suffix to the name
* Added new virtual keyboard functions that use InputMethodManager to show/hide keyboard
* Hide the virtual keyboard, if shown, onPause
* Slate edit box decides which functions to call for showing/hiding keyboard
- eventually will be based on command line parameter like in IOS
#jira UEPLAT-1423
Change 3226167 on 2016/12/07 by Dmitry.Rekman
Allow running as root on ARM.
(Edigrating 3204974 to Dev-Platform)
Change 3226168 on 2016/12/07 by Dmitry.Rekman
Print current CVar value when denying an override.
(Based on CL 3205476).
Change 3226169 on 2016/12/07 by Dmitry.Rekman
Allow enabling sound (if disabled by default).
(Based on CL 3205505)
Change 3226171 on 2016/12/07 by Dmitry.Rekman
Allow running from symlinks.
(Edigrating 3205518 to Dev-Platform).
Change 3226174 on 2016/12/07 by Dmitry.Rekman
Linux: do not init SDL audio (we do not use it anyway).
(Based on CL 3205505).
Change 3226327 on 2016/12/07 by Nick.Shin
fix CIS warning
#jira UE-38281 Quicklaunch UFE HTML5 fails to get COTF Header Size
Change 3226506 on 2016/12/08 by Dmitry.Rekman
Fix one more case-sensitive misspelling (UE-39030).
- Submitted as part of PR #2976.
Change 3226542 on 2016/12/08 by Dmitry.Rekman
Linux: fix weirdness with tesselation in GL4 (UE-32865).
- Workaround by CengizT. Proper fix tracked as UE-39489.
Change 3226570 on 2016/12/08 by Dmitry.Rekman
Fix for ar failing due to too long command line (UE-39009).
- Based on PR #2973.
Change 3226575 on 2016/12/08 by Dmitry.Rekman
Add build-essential to dependencies (UE-39053).
- PR #2981 contributed by cpyarger.
Change 3227129 on 2016/12/08 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Fixed up a deferred GL error as well
Fixed some copyrights of files not in main
Change 3227260 on 2016/12/08 by Omar.Rodriguez
UE-39140 Projects with iCloud are failing provisioning check when code signing.
* Set default value of bEnableCloudKitSupport to False
* Set value of get-task-allow to true only on non-distribution builds
* Only write out the entitlements file if changes have been made
#jira UE-39140
Change 3229312 on 2016/12/09 by Dmitry.Rekman
Fix missing responses (UE-39572).
- Proper implementation of UE-39009.
Change 3230849 on 2016/12/12 by Dmitry.Rekman
Linux: fixed Android packaging (UE-39635).
- Misspelled case; fixed by JohnHenry Carawon.
#jira UE-39635
Change 3231591 on 2016/12/12 by Peter.Sauerbrei
fix for splash screen not being turned off by default
#jira UE-39591
Change 3231880 on 2016/12/12 by Josh.Adams
- Fixing StaticAnalysis warnings, but -enablecodeanalysis stopped working for some reason, and the /Zm thing has hit me really hard, so this is a hopeful checkin for static analysis issues
#jira UE-39680
Change 3232816 on 2016/12/13 by Dmitry.Rekman
Linux: fix for CEF (UE-39682)
- Fix by Cengiz.Terzibas.
Change 3232873 on 2016/12/13 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3232933 on 2016/12/13 by Josh.Adams
- Missed the files that were needed to fix up after merge from main, but didn';t come from main
Change 3233066 on 2016/12/13 by Ben.Marsh
UBT: Ignore exception if PATH variable contains invalid characters when looking for XGE.
Change 3233512 on 2016/12/13 by Ben.Marsh
Fix static analysis warnings.
[CL 3233813 by Josh Adams in Main branch]
2016-12-13 19:47:16 -05:00
|
|
|
FResolveInfoCached* ISocketSubsystem::CreateResolveInfoCached(TSharedPtr<FInternetAddr> Addr) const
|
|
|
|
|
{
|
|
|
|
|
return new FResolveInfoCached(*Addr);
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a human readable string from an error code
|
|
|
|
|
*
|
|
|
|
|
* @param Code the error code to check
|
|
|
|
|
*/
|
|
|
|
|
const TCHAR* ISocketSubsystem::GetSocketError(ESocketErrors Code)
|
|
|
|
|
{
|
|
|
|
|
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
|
|
|
|
|
if (Code == SE_GET_LAST_ERROR_CODE)
|
|
|
|
|
{
|
|
|
|
|
Code = GetLastErrorCode();
|
|
|
|
|
}
|
|
|
|
|
switch (Code)
|
|
|
|
|
{
|
|
|
|
|
case SE_NO_ERROR: return TEXT("SE_NO_ERROR");
|
|
|
|
|
case SE_EINTR: return TEXT("SE_EINTR");
|
|
|
|
|
case SE_EBADF: return TEXT("SE_EBADF");
|
|
|
|
|
case SE_EACCES: return TEXT("SE_EACCES");
|
|
|
|
|
case SE_EFAULT: return TEXT("SE_EFAULT");
|
|
|
|
|
case SE_EINVAL: return TEXT("SE_EINVAL");
|
|
|
|
|
case SE_EMFILE: return TEXT("SE_EMFILE");
|
|
|
|
|
case SE_EWOULDBLOCK: return TEXT("SE_EWOULDBLOCK");
|
|
|
|
|
case SE_EINPROGRESS: return TEXT("SE_EINPROGRESS");
|
|
|
|
|
case SE_EALREADY: return TEXT("SE_EALREADY");
|
|
|
|
|
case SE_ENOTSOCK: return TEXT("SE_ENOTSOCK");
|
|
|
|
|
case SE_EDESTADDRREQ: return TEXT("SE_EDESTADDRREQ");
|
|
|
|
|
case SE_EMSGSIZE: return TEXT("SE_EMSGSIZE");
|
|
|
|
|
case SE_EPROTOTYPE: return TEXT("SE_EPROTOTYPE");
|
|
|
|
|
case SE_ENOPROTOOPT: return TEXT("SE_ENOPROTOOPT");
|
|
|
|
|
case SE_EPROTONOSUPPORT: return TEXT("SE_EPROTONOSUPPORT");
|
|
|
|
|
case SE_ESOCKTNOSUPPORT: return TEXT("SE_ESOCKTNOSUPPORT");
|
|
|
|
|
case SE_EOPNOTSUPP: return TEXT("SE_EOPNOTSUPP");
|
|
|
|
|
case SE_EPFNOSUPPORT: return TEXT("SE_EPFNOSUPPORT");
|
|
|
|
|
case SE_EAFNOSUPPORT: return TEXT("SE_EAFNOSUPPORT");
|
|
|
|
|
case SE_EADDRINUSE: return TEXT("SE_EADDRINUSE");
|
|
|
|
|
case SE_EADDRNOTAVAIL: return TEXT("SE_EADDRNOTAVAIL");
|
|
|
|
|
case SE_ENETDOWN: return TEXT("SE_ENETDOWN");
|
|
|
|
|
case SE_ENETUNREACH: return TEXT("SE_ENETUNREACH");
|
|
|
|
|
case SE_ENETRESET: return TEXT("SE_ENETRESET");
|
|
|
|
|
case SE_ECONNABORTED: return TEXT("SE_ECONNABORTED");
|
|
|
|
|
case SE_ECONNRESET: return TEXT("SE_ECONNRESET");
|
|
|
|
|
case SE_ENOBUFS: return TEXT("SE_ENOBUFS");
|
|
|
|
|
case SE_EISCONN: return TEXT("SE_EISCONN");
|
|
|
|
|
case SE_ENOTCONN: return TEXT("SE_ENOTCONN");
|
|
|
|
|
case SE_ESHUTDOWN: return TEXT("SE_ESHUTDOWN");
|
|
|
|
|
case SE_ETOOMANYREFS: return TEXT("SE_ETOOMANYREFS");
|
|
|
|
|
case SE_ETIMEDOUT: return TEXT("SE_ETIMEDOUT");
|
|
|
|
|
case SE_ECONNREFUSED: return TEXT("SE_ECONNREFUSED");
|
|
|
|
|
case SE_ELOOP: return TEXT("SE_ELOOP");
|
|
|
|
|
case SE_ENAMETOOLONG: return TEXT("SE_ENAMETOOLONG");
|
|
|
|
|
case SE_EHOSTDOWN: return TEXT("SE_EHOSTDOWN");
|
|
|
|
|
case SE_EHOSTUNREACH: return TEXT("SE_EHOSTUNREACH");
|
|
|
|
|
case SE_ENOTEMPTY: return TEXT("SE_ENOTEMPTY");
|
|
|
|
|
case SE_EPROCLIM: return TEXT("SE_EPROCLIM");
|
|
|
|
|
case SE_EUSERS: return TEXT("SE_EUSERS");
|
|
|
|
|
case SE_EDQUOT: return TEXT("SE_EDQUOT");
|
|
|
|
|
case SE_ESTALE: return TEXT("SE_ESTALE");
|
|
|
|
|
case SE_EREMOTE: return TEXT("SE_EREMOTE");
|
|
|
|
|
case SE_EDISCON: return TEXT("SE_EDISCON");
|
|
|
|
|
case SE_SYSNOTREADY: return TEXT("SE_SYSNOTREADY");
|
|
|
|
|
case SE_VERNOTSUPPORTED: return TEXT("SE_VERNOTSUPPORTED");
|
|
|
|
|
case SE_NOTINITIALISED: return TEXT("SE_NOTINITIALISED");
|
|
|
|
|
case SE_HOST_NOT_FOUND: return TEXT("SE_HOST_NOT_FOUND");
|
|
|
|
|
case SE_TRY_AGAIN: return TEXT("SE_TRY_AGAIN");
|
|
|
|
|
case SE_NO_RECOVERY: return TEXT("SE_NO_RECOVERY");
|
|
|
|
|
case SE_NO_DATA: return TEXT("SE_NO_DATA");
|
|
|
|
|
default: return TEXT("Unknown Error");
|
|
|
|
|
};
|
|
|
|
|
#else
|
|
|
|
|
return TEXT("");
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|