[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: classic ui: re-order archive_log_path into cgiutils.c

git at icinga.org git at icinga.org
Mon Mar 14 15:35:30 CET 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Mar 14 15:25:33 2011 +0100

classic ui: re-order archive_log_path into cgiutils.c

...where it is being written/modified, while readlog.c
only reads those strings. now archived logs can be searched
again.

refs #516

---

 cgi/cgiutils.c |    6 +++---
 cgi/readlogs.c |    7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 23a3e44..ca73b89 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -87,12 +87,12 @@ extern time_t   last_command_check;
 extern time_t   last_log_rotation;
 
 /** readlogs.c **/
-extern int	log_rotation_method;
+int		log_rotation_method;
 extern time_t	this_scheduled_log_rotation;
 extern time_t	last_scheduled_log_rotation;
 extern time_t	next_scheduled_log_rotation;
-extern char	log_file[MAX_INPUT_BUFFER];
-extern char	log_archive_path[MAX_INPUT_BUFFER];
+char		log_file[MAX_INPUT_BUFFER];
+char		log_archive_path[MAX_INPUT_BUFFER];
 
 
 int             check_external_commands=0;
diff --git a/cgi/readlogs.c b/cgi/readlogs.c
index 6e9c8fc..708cd79 100644
--- a/cgi/readlogs.c
+++ b/cgi/readlogs.c
@@ -31,14 +31,14 @@ logfilter	*filter_list=NULL;
 logentry 	*entry_list=NULL;
 
 /** Initialazing some vars */
-int             log_rotation_method=LOG_ROTATION_NONE;
+extern int      log_rotation_method=LOG_ROTATION_NONE;
 
 time_t          this_scheduled_log_rotation=0L;
 time_t          last_scheduled_log_rotation=0L;
 time_t          next_scheduled_log_rotation=0L;
 
-char            log_file[MAX_FILENAME_LENGTH];
-char            log_archive_path[MAX_FILENAME_LENGTH];
+extern char     log_file[MAX_FILENAME_LENGTH];
+extern char     log_archive_path[MAX_FILENAME_LENGTH];
 
 
 /** Functions 
@@ -113,6 +113,7 @@ int get_log_entries(char *log_file, char *search_string, int reverse,time_t ts_s
 	if(reverse==FALSE){
 
 		if((thefile=mmap_fopen(log_file))==NULL){
+			//printf("error opening file: %s",log_file);
 			error=READLOG_ERROR_NOFILE;
 		}
 	}





More information about the icinga-checkins mailing list