Changeset 3769
- Timestamp:
- 01/11/08 18:30:38 (12 months ago)
- Location:
- branches/centreon-1.4.2.4/ODS/lib
- Files:
-
- 4 modified
-
getHostData.pm (modified) (1 diff)
-
getServiceData.pm (modified) (4 diffs)
-
identifyMetric.pm (modified) (1 diff)
-
purge.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/centreon-1.4.2.4/ODS/lib/getHostData.pm
r3554 r3769 29 29 my $data_host = $sth2->fetchrow_hashref(); 30 30 my $host_id = $data_host->{'host_id'}; 31 $sth2->finish(); 31 32 undef($sth2); 32 33 undef($data_host); -
branches/centreon-1.4.2.4/ODS/lib/getServiceData.pm
r3585 r3769 30 30 if (!$sth2->execute) {writeLogFile("Error when getting service id : " . $sth2->errstr . "\n");} 31 31 my $data = $sth2->fetchrow_hashref(); 32 $sth2->finish(); 32 33 undef($sth2); 33 34 … … 50 51 $service_id = $data->{'service_id'}; 51 52 undef($data); 53 $sth2->finish(); 52 54 undef($sth2); 53 55 return $service_id; … … 102 104 if (!$sth1->execute){writeLogFile("Error where getting service interval : ".$sth1->errstr."\n");} 103 105 my $data_metric = $sth1->fetchrow_hashref(); 106 $sth1->finish(); 104 107 105 108 $sth1 = $con_ods->prepare("SELECT service_id FROM index_data WHERE id = '".$data_metric->{'index_id'}."'"); 106 109 if (!$sth1->execute) {writeLogFile("Error where getting service interval 2 : ".$sth1->errstr."\n");} 107 110 my $data_hst_svc = $sth1->fetchrow_hashref(); 111 $sth1->finish(); 108 112 undef($sth1); 109 113 undef($data_metric); 114 110 115 my $return = getMyServiceField($data_hst_svc->{'service_id'}, "service_normal_check_interval"); 111 116 undef($data_hst_svc); … … 116 121 $sth1 = $con_ods->prepare("SELECT service_id FROM index_data WHERE id = '".$_[0]."'"); 117 122 if (!$sth1->execute) {writeLogFile("Error where getting service interval 2 : ".$sth1->errstr."\n");} 118 my $data_hst_svc = $sth1->fetchrow_hashref(); 123 my $data_hst_svc = $sth1->fetchrow_hashref(); 124 $sth1->finish(); 119 125 undef($sth1); 120 126 undef($data_metric); -
branches/centreon-1.4.2.4/ODS/lib/identifyMetric.pm
r3586 r3769 37 37 if (!$sth1->execute) {writeLogFile("Error:" . $sth1->errstr . "\n");} 38 38 my $configuration = $sth1->fetchrow_hashref(); 39 $sth1->finish(); 39 40 undef($sth1); 40 41 -
branches/centreon-1.4.2.4/ODS/lib/purge.pm
r3504 r3769 28 28 $srv_list{$data->{'host_host_id'} ."_". $data->{'service_service_id'}} = 1; 29 29 } 30 $sth2->finish(); 30 31 undef($data); 31 32 undef($sth2); … … 40 41 } 41 42 } 43 $sth2->finish(); 44 $sth3->finish(); 42 45 undef($data); 43 46 undef($sth2); … … 59 62 writeLogFile("Error when deleting Data for host ".$data->{'host_id'}." and svc ".$data->{'service_id'}." m : ".$data_svc->{'metric_id'}." :" . $sth2->errstr . "\n"); 60 63 } 64 $sth2->finish(); 61 65 undef($sth2); 62 66 $sth2 = $con_ods->prepare("DELETE FROM metrics WHERE metric_id = '".$data_svc->{'metric_id'}."'"); … … 64 68 writeLogFile("Error when deleting Metrics for host ".$data->{'host_id'}." and svc ".$data->{'service_id'}." m : ".$data_svc->{'metric_id'}." : " . $sth2->errstr . "\n"); 65 69 } 70 $sth2->finish(); 66 71 undef($sth2); 67 72 $t++; … … 73 78 writeLogFile("Error when index for host ".$data->{'host_id'}." and svc ".$data->{'service_id'}." :" . $sth2->errstr . "\n"); 74 79 } 80 $sth2->finish(); 75 81 } 76 82 undef($sth2); … … 78 84 } 79 85 } 86 $sth->finish(); 87 $sth2->finish(); 80 88 undef($sth); 81 89 undef($sth2);
