[PATCH] fix inline declarations in trends.cgi from previous patch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[PATCH] fix inline declarations in trends.cgi from previous patch

Post by Guest »

This is a multi-part message in MIME format.
--------------040501000208000701060706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Andreas Ericsson wrote:
> On 01/03/2011 03:13 PM, Carsten Emde wrote:
>
> Applied and pushed. Thanks
>

Nice patch, thanks. It contains several inline declarations which i have
reworked while applying against Icinga CGIs. Attached is a git patch
against current Nagios HEAD (from git.op5.org, thx for the mirror)
resolving those things too.

Kind regards,
Michael

--
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email: [email protected]
phone: +43 1 4277 14359
fax: +43 1 4277 14338
web: http://www.univie.ac.at/zid
http://www.aco.net

Icinga Core& IDOUtils Developer
http://www.icinga.org


--------------040501000208000701060706
Content-Type: text/x-diff;
name="0001-fix-inline-declarations-in-trends.cgi-from-previous-.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0001-fix-inline-declarations-in-trends.cgi-from-previous-.pa";
filename*1="tch"

From 2f9caa7268402fe4b25d669094594402eaa26819 Mon Sep 17 00:00:00 2001
From: Michael Friedrich
Date: Fri, 7 Jan 2011 09:18:11 +0100
Subject: [PATCH] fix inline declarations in trends.cgi from previous patch

---
cgi/trends.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/cgi/trends.c b/cgi/trends.c
index 9f3f481..60dde4d 100644
--- a/cgi/trends.c
+++ b/cgi/trends.c
@@ -266,6 +266,12 @@ int main(int argc, char **argv){
time_t t3;
time_t current_time;
struct tm *t;
+ time_t old_t1;
+ time_t old_t2;
+ archived_state *temp_as;
+ time_t problem_t1=0;
+ time_t problem_t2=0;
+ time_t margin;


/* reset internal CGI variables */
@@ -365,7 +371,8 @@ int main(int argc, char **argv){
}

if(mode==CREATE_HTML && display_header==TRUE){
- time_t old_t1=t1, old_t2=t2;
+ old_t1=t1;
+ old_t2=t2;

/* begin top table */
printf("\n");
@@ -384,8 +391,8 @@ int main(int argc, char **argv){
display_info_table(temp_buffer,FALSE,&current_authdata);

if (timeperiod_type==TIMEPERIOD_NEXTPROBLEM) {
- archived_state *temp_as;
- time_t problem_t1, problem_t2=0;
+ problem_t1=0;
+ problem_t2=0;

t1=t2;
t2=current_time;
@@ -427,7 +434,6 @@ int main(int argc, char **argv){
}
}
if(problem_found==TRUE) {
- time_t margin;

if (problem_t2==0){
margin=12*60*60;
--
1.7.1.1



--------------040501000208000701060706--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked