2008-04-17 Sancho Lerena <slerena@artica.es>

* lib/PandoraFMS/Config.pm: Shorten description in help.

        * lib/PandoraFMS/DB.pm: Data server module autocreation don't
        assign a id_module to tagente_module record. Fixed.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@809 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2008-04-17 15:05:35 +00:00
parent 1280425526
commit 68424bb75e
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2008-04-17 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Config.pm: Shorten description in help.
* lib/PandoraFMS/DB.pm: Data server module autocreation don't
assign a id_module to tagente_module record. Fixed.
2008-04-16 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Small code optimization. Took a couple

View File

@ -51,7 +51,7 @@ my %pa_config;
##########################################################################
sub help_screen {
printf "\nSyntax: \n\n pandora_server < fullpathname to pandora server configuration file > [ options ] \n\n";
printf "\nSyntax: \n\n pandora_server [ options ] < fullpathname to configuration file > \n\n";
printf "Following options are optional : \n";
printf " -v : Verbose mode activated, give more information in logfile \n";
printf " -d : Debug mode activated, give extensive information in logfile \n";

View File

@ -1856,15 +1856,14 @@ sub crea_agente_modulo (%$$$$$$$) {
$min = sqlWrap ($min);
$nombre_modulo = sqlWrap ($nombre_modulo);
my $query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $min, $descripcion)";
my $query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $min, $descripcion, 1)";
if (($max eq "") and ($min eq "")) {
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $descripcion)";
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $descripcion, 1)";
} elsif ($min eq "") {
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $descripcion)";
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $descripcion, 1)";
} elsif ($min eq "") {
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,min,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $min, $descripcion)";
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,min,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $min, $descripcion, 1)";
}
logger( $pa_config, "DEBUG: Query for autocreate : $query ", 10);
$dbh->do($query);
return $dbh->{'mysql_insertid'};
}