loolwsd/LOOLBroker.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit e070ffc8e45032f8e941ddf6ccc0b37bc201a44c Author: Henry Castro <hcas...@collabora.com> Date: Tue Aug 18 16:56:05 2015 -0400 loolwsd: add preinit parameters diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp index 21bed65..8930883 100644 --- a/loolwsd/LOOLBroker.cpp +++ b/loolwsd/LOOLBroker.cpp @@ -49,6 +49,8 @@ #define LIB_SWLO "lib" "swlo" ".so" #define LIB_SDLO "lib" "sdlo" ".so" +typedef int (LokHookPreInit) ( const char *install_path, const char *user_profile_path ); + using Poco::Path; using Poco::File; using Poco::ThreadLocal; @@ -223,6 +225,7 @@ static std::map<Poco::Process::PID, Poco::UInt64> _childProcesses; static bool globalPreinit(const std::string &loSubPath) { void *handle; + LokHookPreInit* preInit; std::string fname = "/" + loSubPath + "/program/" LIB_SOFFICEAPP; handle = dlopen(fname.c_str(), RTLD_GLOBAL|RTLD_NOW); @@ -232,17 +235,14 @@ static bool globalPreinit(const std::string &loSubPath) return false; } - typedef int (*PreInitFn) (void); - PreInitFn preInit; - - preInit = (PreInitFn)dlsym(handle, "lok_preinit"); + preInit = (LokHookPreInit *)dlsym(handle, "lok_preinit"); if (!preInit) { std::cout << Util::logPrefix() << " Failed to find lok_preinit hook in library :" << LIB_SOFFICEAPP << std::endl; return false; } - return preInit() == 0; + return preInit(("/" + loSubPath + "/program").c_str(), "file:///user") == 0; } static int createLibreOfficeKit(bool sharePages, std::string loSubPath, Poco::UInt64 childID) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits