[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: fix variable defaults in trends. cgi for next problem patch

git at icinga.org git at icinga.org
Fri Jan 7 09:16:39 CET 2011


Module: icinga-core
Branch: mfriedrich/core
Commit: c8c0fa74cdd6fdcc783ad1aff346b6f2d94f5a0a
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c8c0fa74cdd6fdcc783ad1aff346b6f2d94f5a0a

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jan  7 09:16:14 2011 +0100

fix variable defaults in trends.cgi for next problem patch

---

 cgi/trends.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cgi/trends.c b/cgi/trends.c
index 277b625..e8f8701 100644
--- a/cgi/trends.c
+++ b/cgi/trends.c
@@ -269,9 +269,11 @@ int main(int argc, char **argv){
 	time_t t3;
 	time_t current_time;
 	struct tm *t;
-	time_t old_t1, old_t2;
+	time_t old_t1;
+	time_t old_t2;
 	archived_state *temp_as;
-	time_t problem_t1, problem_t2=0;
+	time_t problem_t1=0;
+	time_t problem_t2=0;
 	time_t margin;
 
 	/* reset internal CGI variables */
@@ -392,6 +394,8 @@ int main(int argc, char **argv){
 		display_info_table(temp_buffer,FALSE,&current_authdata, daemon_check);
 
 		if (timeperiod_type==TIMEPERIOD_NEXTPROBLEM) {
+			problem_t1=0;
+			problem_t2=0;
 
 			t1=t2;
 			t2=current_time;





More information about the icinga-checkins mailing list