From 77d86636c47e9fc0838225e66b855f639083189c Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Fri, 8 Jan 2016 17:33:34 +0900 Subject: [PATCH] (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). --- pandora_console/operation/snmpconsole/snmp_view.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index a5e13de0a2..a8f9310390 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -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; }