Do not search the agent name in tagente.direccion.

Ref. pandora_enterprise#7952.
This commit is contained in:
Ramon Novoa 2021-09-06 13:32:17 +02:00
parent 6bb994f4b7
commit 7fbd5ed735
1 changed files with 2 additions and 2 deletions

View File

@ -273,9 +273,9 @@ sub get_agent_id ($$) {
my $rc;
if($is_meta == 1) {
$rc = get_db_value ($dbh, "SELECT id_agente FROM tmetaconsole_agent WHERE nombre = ? OR direccion = ?", safe_input($agent_name), $agent_name);
$rc = get_db_value ($dbh, "SELECT id_agente FROM tmetaconsole_agent WHERE nombre = ?", safe_input($agent_name));
} else {
$rc = get_db_value ($dbh, "SELECT id_agente FROM tagente WHERE nombre = ? OR direccion = ?", safe_input($agent_name), $agent_name);
$rc = get_db_value ($dbh, "SELECT id_agente FROM tagente WHERE nombre = ?", safe_input($agent_name));
}
return defined ($rc) ? $rc : -1;