#7522 fixed duplicate ip_target

This commit is contained in:
Daniel Maya 2021-05-12 12:39:56 +02:00
parent 5021f66808
commit a08a69fa91
1 changed files with 10 additions and 1 deletions

View File

@ -218,7 +218,16 @@ function modules_copy_agent_module_to_agent($id_agent_module, $id_destiny_agent,
$new_module = $module;
// Rewrite different values
if ($module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_CMD
|| $module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_CMD_PROC
|| $module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_CMD_STRING
|| $module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_CMD_INC
) {
$new_module['ip_target'] = $module['ip_target'];
} else {
$new_module['ip_target'] = agents_get_address($id_destiny_agent);
}
$new_module['policy_linked'] = 0;
$new_module['id_policy_module'] = 0;