#include <algorithm>
#include <dpl/log/log.h>
+#include <dpl/log/secure_log.h>
#include <dpl/foreach.h>
+#include <dpl/scope_guard.h>
namespace WrtPluginsApi {
void PluginRegistry::AddPlugin(const std::string& libraryName,
LogError("Error: " << (error != NULL ? error : "unknown"));
continue;
}
+ DPL_SCOPE_EXIT(handle) {
+ if (dlclose(handle) != 0) {
+ const char* error = dlerror();
+ if (error != NULL)
+ {
+ std::string errstr{error};
+ _E("%s", errstr.c_str());
+ }
+ else
+ {
+ _E("unknown error while closing plug-in library");
+ }
+ }
+ };
ExportedApi* entryPoint =
static_cast<ExportedApi*>