(only for Oracle) Fixed if direccion of any agents has NULL, snmp console fail to list
unregistered agents' trap (by using "NOT IN" against NULL-inclued list).
This commit is contained in:
parent
2b0035fcf5
commit
77d86636c4
|
@ -234,7 +234,7 @@ switch ($config["dbtype"]) {
|
|||
WHERE (source IN (
|
||||
SELECT direccion FROM tagente
|
||||
WHERE id_grupo IN ($str_user_groups)
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente)) %s
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL)) %s
|
||||
ORDER BY timestamp DESC";
|
||||
break;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ switch ($config["dbtype"]) {
|
|||
WHERE (source IN (
|
||||
SELECT direccion FROM tagente
|
||||
WHERE id_grupo IN ($str_user_groups)
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente))
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL))
|
||||
%s
|
||||
ORDER BY timestamp DESC";
|
||||
$sql_count = "SELECT COUNT(id_trap)
|
||||
|
@ -275,7 +275,7 @@ switch ($config["dbtype"]) {
|
|||
source IN (
|
||||
SELECT direccion FROM tagente
|
||||
WHERE id_grupo IN ($str_user_groups)
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente))
|
||||
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL))
|
||||
%s";
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue