|
| 1 | +Index: git/Source/core/Services.h |
| 2 | +=================================================================== |
| 3 | +--- git.orig/Source/core/Services.h |
| 4 | ++++ git/Source/core/Services.h |
| 5 | +@@ -97,7 +97,9 @@ namespace Core { |
| 6 | + |
| 7 | + public: |
| 8 | + Library LoadLibrary(const TCHAR libraryName[]) { |
| 9 | ++ printf("###############Debug: Acquring lock to load library"); |
| 10 | + Core::SafeSyncType<Core::CriticalSection> lock(_adminLock); |
| 11 | ++ printf("###############Debug: Acquired lock"); |
| 12 | + return (Library(libraryName)); |
| 13 | + } |
| 14 | + // There is *NO* locking around the _callback pointer. SO this callback |
| 15 | +Index: git/Source/WPEFramework/PluginServer.h |
| 16 | +=================================================================== |
| 17 | +--- git.orig/Source/WPEFramework/PluginServer.h |
| 18 | ++++ git/Source/WPEFramework/PluginServer.h |
| 19 | +@@ -1850,12 +1850,16 @@ namespace PluginHost { |
| 20 | + std::vector<string> all_paths = GetLibrarySearchPaths(name); |
| 21 | + std::vector<string>::const_iterator iter = std::begin(all_paths); |
| 22 | + |
| 23 | ++ printf("###############Debug: Going to load library %s", name); |
| 24 | + while ( (iter != std::end(all_paths)) && (progressedState <= 2) ) { |
| 25 | + Core::File libraryToLoad(*iter); |
| 26 | + |
| 27 | ++ printf("###############Debug: progressedState %d", progressedState); |
| 28 | + if (libraryToLoad.Exists() == true) { |
| 29 | ++ printf("###############Debug: Library exists to load"); |
| 30 | + if (progressedState == 0) { |
| 31 | + progressedState = 1; |
| 32 | ++ printf("###############Debug: progressedState %d", progressedState); |
| 33 | + } |
| 34 | + |
| 35 | + // Loading a library, in the static initializers, might register Service::MetaData structures. As |
| 36 | +@@ -1863,17 +1867,23 @@ namespace PluginHost { |
| 37 | + // ServiceAdministrator, is already taken before entering the dlopen. This can only be achieved |
| 38 | + // by forwarding this call to the ServiceAdministrator, so please so... |
| 39 | + Core::Library newLib = Core::ServiceAdministrator::Instance().LoadLibrary(iter->c_str()); |
| 40 | ++ printf("###############Debug: LoadLibrary call done"); |
| 41 | + |
| 42 | + if (newLib.IsLoaded() == true) { |
| 43 | ++ printf("###############Debug: Library is loaded"); |
| 44 | + if (progressedState == 1) { |
| 45 | + progressedState = 2; |
| 46 | ++ printf("###############Debug: progressedState %d", progressedState); |
| 47 | + } |
| 48 | + |
| 49 | + Core::System::ModuleBuildRefImpl moduleBuildRef = reinterpret_cast<Core::System::ModuleBuildRefImpl>(newLib.LoadFunction(_T("ModuleBuildRef"))); |
| 50 | + Core::System::ModuleServiceMetadataImpl moduleServiceMetadata = reinterpret_cast<Core::System::ModuleServiceMetadataImpl>(newLib.LoadFunction(_T("ModuleServiceMetadata"))); |
| 51 | ++ printf("###############Debug: progressedState %d", progressedState); |
| 52 | ++ |
| 53 | + if ((moduleBuildRef != nullptr) && (moduleServiceMetadata != nullptr)) { |
| 54 | + result = newLib; |
| 55 | + progressedState = 3; |
| 56 | ++ printf("###############Debug: progressedState %d", progressedState); |
| 57 | + if (_metadata.IsValid() == false) { |
| 58 | + _metadata = moduleServiceMetadata(); |
| 59 | + if (_metadata.IsValid() == true) { |
0 commit comments