2007-07-13 Sancho Lerena <slerena@artica.es>

* pandora_console/godmode/agentes/configurar_agente.php: Fixed
        problem when creating manually an agent: does not create IP
        address in tadress table, so Recon Server create again system with
        the same IP.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@560 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-07-13 10:34:00 +00:00
parent 3c3c4dd46b
commit 1740364144
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2007-07-13 Sancho Lerena <slerena@artica.es> 2007-07-13 Sancho Lerena <slerena@artica.es>
* pandora_console/godmode/agentes/configurar_agente.php: Fixed
problem when creating manually an agent: does not create IP
address in tadress table, so Recon Server create again system with
the same IP.
* operation/agentes/estado_ultimopaquete.php: Fixed problem with * operation/agentes/estado_ultimopaquete.php: Fixed problem with
modules in tagente_estado with no data (because they has not been modules in tagente_estado with no data (because they has not been
initializated, due from it's creation it cannot get real initializated, due from it's creation it cannot get real

View File

@ -113,13 +113,15 @@ if (isset($_POST["create_agent"])) { // Create a new and shining agent
} else { } else {
$sql_insert ="INSERT INTO tagente (nombre, direccion, id_grupo, intervalo, comentarios,modo, id_os, disabled) VALUES ('".$nombre_agente."', '".$direccion_agente."', '".$grupo."', '".$intervalo."', '".$comentarios."',".$modo.", ".$id_os.", '".$disabled."')"; $sql_insert ="INSERT INTO tagente (nombre, direccion, id_grupo, intervalo, comentarios,modo, id_os, disabled) VALUES ('".$nombre_agente."', '".$direccion_agente."', '".$grupo."', '".$intervalo."', '".$comentarios."',".$modo.", ".$id_os.", '".$disabled."')";
} }
$result=mysql_query($sql_insert); $result=mysql_query($sql_insert);
if ($result) { if ($result) {
$agent_created_ok = 1; $agent_created_ok = 1;
$id_agente = mysql_insert_id(); $id_agente = mysql_insert_id();
// Create special MODULE agent_keepalive // Create special MODULE agent_keepalive
$sql_insert ="INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion) VALUES ('agent_keepalive', ".$id_agente.",-1,'Agent Keepalive monitor')"; $sql_insert ="INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion) VALUES ('agent_keepalive', ".$id_agente.",-1,'Agent Keepalive monitor')";
$result=mysql_query($sql_insert); $result=mysql_query($sql_insert);
// Create address for this agent in taddress
agent_add_address ($id_agente, $direccion_agente);
} }
} }