+ case SYSLOG_IRIX:
+ log_date = line;
+ log_time = line;
+ if (log_date.Year() < 0 || log_date.Year() > 2500)
+ {
+ // The year is not in the log file. Assume the year of arrival,
+ // unless this puts the log entry at a later date than the arrival date.
+ // This happens e.g. when a log entry from December arrives in Januari.
+
+ log_date = date(log_date.Day(), log_date.Month(), date(arrival).Year());
+ if (log_date > date(arrival))
+ {
+ log_date = date(log_date.Day(), log_date.Month(), date(arrival).Year() - 1);
+ }
+ }
+
+ if (verbose)
+ {
+ std::cout << " Log timestamp = " << log_date << " " << log_time << "\n";
+ }
+ rest = line << 19;
+ i = rest.index(' ');
+ if (rest(0,i) == hostname(0,i))
+ {
+ rest <<= i + 1;
+ if (verbose)
+ {
+ std::cout << " Hostname matches.\n";
+ std::cout << " rest = " << rest << "\n";
+ }
+ for (i = 0; isalpha(rest[i]) && i < ~rest; i++);
+ if (verbose)
+ {
+ std::cout << " Service name = " << rest(0,i) << "\n";
+ }
+
+ /* Insert a new record into the log table */
+
+ insertion += "'" + objectid + "',";
+ insertion += "'" + rest(0,i) + "',";
+ insertion += "'" + log_date.format("%Y-%m-%d") + " " + log_time.format() + "',";
+ insertion += "'" + arrival.format("%Y-%m-%d %T") + "',";
+ insertion += "'" + SQL_Escape(line) + "',FALSE";
+ insertion += ")";
+
+ if (testmode)
+ {
+ std::cout << insertion << "\n";
+ }
+ else
+ {
+ database.Query(insertion);
+ }
+
+ if (verbose)
+ {
+ std::cout << "\n\n";
+ }
+
+ nr_lines++;
+ }
+ else
+ {
+ std::cerr << " Hostname " << rest(0,i) << " does not match.\n";
+ }
+ break;
+