From 002e112c633f9a473fcac15ae3c0defd1d41bd97 Mon Sep 17 00:00:00 2001 From: raulmateos Date: Thu, 29 Jun 2006 22:03:26 +0000 Subject: [PATCH] Fixed small bug when make a snmpwalk. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@64 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- .../godmode/agentes/configurar_agente.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 5e576e5ba4..52afce7a6e 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -2,7 +2,7 @@ // Pandora - the Free monitoring system // ==================================== // Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com -// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es +// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es // Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -457,8 +457,7 @@ if (give_acl($id_user, 0, "AW")==1) { $snmp_oid = $combo_snmp_oid; } $sql_update = "UPDATE tagente_modulo SET max ='".$modulo_max."', min = '".$modulo_min."', nombre='".$nombre."', descripcion='".$descripcion."', tcp_send = '$tcp_send', tcp_rcv = '$tcp_rcv', tcp_port = '$tcp_port', ip_target = '$ip_target', snmp_oid = '$snmp_oid', snmp_community = '$snmp_community', id_module_group = '$id_module_group', module_interval = '$module_interval' WHERE id_agente_modulo = ".$id_agente_modulo; - $result=mysql_query($sql_update); -echo "debug $sql_update
"; + $result=mysql_query($sql_update); if (! $result) echo "

".$lang_label["update_module_no"]."

"; else @@ -793,9 +792,11 @@ if ($update_module == "1"){ else { echo ''; // Default values for new modules - $ip_target = $direccion_agente; - $snmp_community = "public"; - $module_interval = $intervalo; + if ($ip_target == ""){ + $ip_target = $direccion_agente; + $snmp_community = "public"; + $module_interval = $intervalo; + } } ?>