Minor fixes

This commit is contained in:
fbsanchez 2018-09-13 20:36:20 +02:00
parent d0a82c436a
commit 33f3bb57e6
1 changed files with 6 additions and 6 deletions

View File

@ -271,19 +271,19 @@ sub locate_agent {
return undef if (! defined ($field) || $field eq ''); return undef if (! defined ($field) || $field eq '');
my $rs = enterprise_hook('get_metaconsole_agent_from_alias', [$dbh, $field]); my $rs = enterprise_hook('get_metaconsole_agent_from_alias', [$dbh, $field]);
return $rs if defined($rs) && (ref($rs)); # defined and not a scalar return $rs if defined($rs) && (ref($rs)); # defined and not a scalar
$rs = enterprise_hook('get_metaconsole_agent_from_addr', [$dbh, $field]); $rs = enterprise_hook('get_metaconsole_agent_from_addr', [$dbh, $field]);
return $rs if defined($rs) && (ref($rs)); # defined and not a scalar return $rs if defined($rs) && (ref($rs)); # defined and not a scalar
$rs = enterprise_hook('get_metaconsole_agent_from_name', [$dbh, $field]); $rs = enterprise_hook('get_metaconsole_agent_from_name', [$dbh, $field]);
return $rs if defined($rs) && (ref($rs)); # defined and not a scalar return $rs if defined($rs) && (ref($rs)); # defined and not a scalar
} else { } else {
return get_agent($dbh, $field); return get_agent($dbh, $field);
} }
return undef return undef;
} }