Merge branch '106-faltan-los-no-iniciados-en-agents_get_status' into 'develop'

Added not init state if there are no initialized modules

Closes #106

See merge request !309
This commit is contained in:
vgilc 2017-04-07 12:49:53 +02:00
commit c3157f2aea
1 changed files with 4 additions and 0 deletions

View File

@ -1739,6 +1739,10 @@ function agents_get_status($id_agent = 0, $noACLs = false) {
}
}
if (!isset($modules) || empty($modules) || count($modules) == 0) {
return AGENT_MODULE_STATUS_NOT_INIT;
}
$modules_status = array();
$modules_async = 0;
foreach ($modules as $module) {