add basic plugin
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "./clamav_module_async_wrapper.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
ClamAVModuleAsyncWrapper::ClamAVModuleAsyncWrapper(ClamAVModuleInterface& cavmi) : _cavmi(cavmi) {
|
||||
}
|
||||
|
||||
@@ -7,6 +9,7 @@ std::future<ClamAVModuleAsyncWrapper::ScanResult> ClamAVModuleAsyncWrapper::scan
|
||||
return std::async(
|
||||
std::launch::async,
|
||||
[this](std::string inner_path) {
|
||||
std::srand(5693);
|
||||
// TODO: optimize, clamav supports multi threading
|
||||
std::lock_guard lock_guard{_cavmi_mutex};
|
||||
return _cavmi.scanFilePath(inner_path);
|
||||
|
Reference in New Issue
Block a user