mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
[proxy,modules] fix module load check
This commit is contained in:
parent
939e922936
commit
b4587efad1
@ -436,21 +436,26 @@ static BOOL pf_modules_load_ArrayList_ForEachFkt(void* data, size_t index, va_li
|
||||
{
|
||||
proxyPlugin* plugin = (proxyPlugin*)data;
|
||||
const char* plugin_name = va_arg(ap, const char*);
|
||||
BOOL* res = va_arg(ap, BOOL*);
|
||||
|
||||
WINPR_UNUSED(index);
|
||||
WINPR_UNUSED(ap);
|
||||
WINPR_ASSERT(res);
|
||||
|
||||
if (strcmp(plugin->name, plugin_name) == 0)
|
||||
*res = TRUE;
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL pf_modules_is_plugin_loaded(proxyModule* module, const char* plugin_name)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
WINPR_ASSERT(module);
|
||||
if (ArrayList_Count(module->plugins) < 1)
|
||||
return FALSE;
|
||||
return ArrayList_ForEach(module->plugins, pf_modules_load_ArrayList_ForEachFkt, plugin_name);
|
||||
if (!ArrayList_ForEach(module->plugins, pf_modules_load_ArrayList_ForEachFkt, plugin_name, &rc))
|
||||
return FALSE;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static BOOL pf_modules_print_ArrayList_ForEachFkt(void* data, size_t index, va_list ap)
|
||||
|
Loading…
Reference in New Issue
Block a user