[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp

Tor Lillqvist tml at collabora.com
Mon Apr 4 09:10:34 UTC 2016


 loolwsd/LOOLBroker.cpp |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7cb5baedfca984f034b5861f9dde8ed236329656
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Apr 4 12:05:55 2016 +0300

    Try libmerged first
    
    In the instdir/program of an --enable-mergelibs build of LibreOffice
    there is also a dummy libsofficeapp.so. Obviously we don't want to
    even try that. So look for libmergedlo.so first.

diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index c578574..91da688 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -1184,31 +1184,31 @@ private:
 static void globalPreinit(const std::string &loTemplate)
 {
     const std::string libSofficeapp = loTemplate + "/program/" LIB_SOFFICEAPP;
+    const std::string libMerged = loTemplate + "/program/" LIB_MERGED;
 
     std::string loadedLibrary;
     void *handle;
-    if (File(libSofficeapp).exists())
+    if (File(libMerged).exists())
     {
-        handle = dlopen(libSofficeapp.c_str(), RTLD_GLOBAL|RTLD_NOW);
+        handle = dlopen(libMerged.c_str(), RTLD_GLOBAL|RTLD_NOW);
         if (!handle)
         {
-            Log::error("Failed to load " + libSofficeapp + ": " + std::string(dlerror()));
+            Log::error("Failed to load " + libMerged + ": " + std::string(dlerror()));
             _exit(Application::EXIT_SOFTWARE);
         }
-        loadedLibrary = libSofficeapp;
+        loadedLibrary = libMerged;
     }
     else
     {
-        std::string libMerged = loTemplate + "/program/" LIB_MERGED;
-        if (File(libMerged).exists())
+        if (File(libSofficeapp).exists())
         {
-            handle = dlopen(libMerged.c_str(), RTLD_GLOBAL|RTLD_NOW);
+            handle = dlopen(libSofficeapp.c_str(), RTLD_GLOBAL|RTLD_NOW);
             if (!handle)
             {
-                Log::error("Failed to load " + libMerged + ": " + std::string(dlerror()));
+                Log::error("Failed to load " + libSofficeapp + ": " + std::string(dlerror()));
                 _exit(Application::EXIT_SOFTWARE);
             }
-            loadedLibrary = libMerged;
+            loadedLibrary = libSofficeapp;
         }
         else
         {


More information about the Libreoffice-commits mailing list