prelude-lml/master: Compute statistics directly from the dispatch function

[email protected] Mon, 8 Feb 2010 11:24:48 +0100 (CET)
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 83300a54cbe6a76c4bc09c4363ffe45efbb70a83
Author: Yoann Vandoorselaere <[email protected]>
Date:   Fri Feb 5 16:25:39 2010 +0100

    Compute statistics directly from the dispatch function
    
    Previously, UDP server processed log were missing from the statistics.


========================================

 src/file-server.c |    2 --
 src/prelude-lml.c |    1 +
 2 files changed, 1 insertions(+), 2 deletions(-)

========================================

diff --git a/src/file-server.c b/src/file-server.c
index 8ef82af..3e34d93 100644
--- a/src/file-server.c
+++ b/src/file-server.c
@@ -523,7 +523,6 @@ static int check_logfile_data(monitor_fd_t *monitor, ev_statdata *st)
         while ( len && (ret = read_logfile(monitor, &len)) >= 0 ) {
 
                 eventno++;
-                config.line_processed++;
 
                 /*
                  * If the line we read only contained a '\n', string and len will be 0.
@@ -570,7 +569,6 @@ static int check_stdin_data(monitor_fd_t *monitor)
         while ( len && (ret = read_logfile(monitor, &len)) >= 0 ) {
 
                 eventno++;
-                config.line_processed++;
 
                 /*
                  * If the line we read only contained a '\n', string and len will be 0.
diff --git a/src/prelude-lml.c b/src/prelude-lml.c
index d0f2fc8..8414ebc 100644
--- a/src/prelude-lml.c
+++ b/src/prelude-lml.c
@@ -262,6 +262,7 @@ void lml_dispatch_log(lml_log_source_t *ls, const char *str, size_t size)
                    lml_log_entry_get_message(log_entry), lml_log_entry_get_message_len(log_entry));
 
         lml_log_entry_destroy(log_entry);
+        config.line_processed++;
 }
 
 
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-technologies.com/mailman/listinfo/prelude-cvslog