From: arjen Date: Wed, 3 Dec 2003 08:21:53 +0000 (+0000) Subject: Change the notation for delays from "days+hh:mm:ss" to "days hh:mm:ss. This X-Git-Tag: V0_0_9~18 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=71768ef90199a3c8e0932b93b78a1cd55eda2a12 Change the notation for delays from "days+hh:mm:ss" to "days hh:mm:ss. This fixes problem report 14. In linux_daemon_sendmail(), check the existence of '=' before using it as a field separator. Fixes problem report 15. --- diff --git a/src/gcm_daemon/classes/gnucomo.process_log.php b/src/gcm_daemon/classes/gnucomo.process_log.php index 4fe4ddf..8fa7329 100644 --- a/src/gcm_daemon/classes/gnucomo.process_log.php +++ b/src/gcm_daemon/classes/gnucomo.process_log.php @@ -141,7 +141,9 @@ function linux_daemon_sendmail() //When this is sendmail find the beginning by chopping everything into //little pieces. $local_log_string = str_replace(" ", " ", $dbms->db_result_row[6]); + //echo " Processing " . $local_log_string . "\n"; $local_logline_array = explode (" ", $local_log_string); + $local_sql_1 = "INSERT INTO log_adv_daemon_email"; //BASIC STATEMENT $local_sql_2 = "logid, detailed_table, service, internal_messageid "; //FIELDS $local_sql_3 = "'".$dbms->db_result_row[0]."', 'log_adv_daemon_email', 'sendmail'"; //VALUES @@ -168,7 +170,7 @@ function linux_daemon_sendmail() $local_sql_2 .= ", source_ip"; $local_sql_3 .= ", '".substr($local_dummy, 1, strlen($local_dummy)-2)."'"; } - else + else if (strstr($local_logline_array[$i], "=")) { $local_element = explode("=", $local_logline_array[$i]); @@ -187,12 +189,12 @@ function linux_daemon_sendmail() case "delay": $local_sql_2 .= ", delay"; - $local_sql_3 .= ", '".$local_element[1]."'"; + $local_sql_3 .= ", '".ereg_replace("+", " ", $local_element[1])."'"; break; case "xdelay": $local_sql_2 .= ", xdelay"; - $local_sql_3 .= ", '".$local_element[1]."'"; + $local_sql_3 .= ", '".ereg_replace("+", " ", $local_element[1])."'"; break; case "mailer": @@ -280,7 +282,7 @@ function linux_kernel_network() $local_sql_3 = "'".$dbms->db_result_row[0]."', 'kernel_network'"; //VALUES $local_len = 0; $local_id = 0; - $lcoal_tos = "F"; + $local_tos = "F"; for ($i = 4; $i <= ( count($local_logline_array) - 1); $i++) {