Commit 86b04fa1 authored by jan.koester's avatar jan.koester
Browse files

test

parent cfb513b0
Loading
Loading
Loading
Loading
+4 −5
Changes for src/plugin.cpp: 4 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -242,9 +242,8 @@ void blogi::Plugin::loadPlugins(const std::string &path, PluginArgs *args){

                        if (!ldplg->pldata) { // FIX: Check ldplg->pldata, not !ldplg->pldata && dlsym_error
                            dlsym_error = dlerror();
                            libhttppp::HTTPException err;
                            err[libhttppp::HTTPException::Error] << "Cannot load library: " << (dlsym_error ? dlsym_error : "Unknown error");
                            throw err;
                            std::cerr << "Cannot load library: " << (dlsym_error ? dlsym_error : "Unknown error");
                            continue;
                        }

                        // Get the address of the 'create' function
@@ -254,8 +253,8 @@ void blogi::Plugin::loadPlugins(const std::string &path, PluginArgs *args){
                            dlsym_error = dlerror();
                            libhttppp::HTTPException err;
                            // The custom deleter will call dlclose when ldplg goes out of scope/is destroyed
                            err[libhttppp::HTTPException::Error] << "Cannot load symbol create: " << (dlsym_error ? dlsym_error : "Unknown error") << '\n';
                            throw err;
                            std::cerr << "Cannot load symbol create: " << (dlsym_error ? dlsym_error : "Unknown error") << '\n';
                            continue;
                        }
                        destroy_t* destroy_plugin = (destroy_t*) dlsym(ldplg->pldata, "destroy");
#endif