author | Rich Burridge <rich.burridge@oracle.com> |
Wed, 23 Jan 2013 12:16:00 -0800 | |
changeset 1130 | a4adf8cbfa5d |
permissions | -rw-r--r-- |
1130
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
--- webalizer-2.21-02/webalizer.c 2009-01-13 06:35:54.000000000 +0100 |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
+++ webalizer-2.21-02/webalizer.c.underrun 2009-03-29 14:16:21.000000000 +0200 |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
@@ -737,10 +737,16 @@ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
rec_sec =atoi(&log_rec.datetime[19]); /* get second number */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
|
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
/* Kludge for Netscape server time (0-24?) error */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
- if (rec_hour>23) rec_hour=0; |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
+ if (rec_hour > 23) |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
+ rec_hour=0; |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
+ /* Handle leap seconds (AC 2004) */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
+ if (rec_sec > 59 && rec_sec < 62) /* 23:59:60/61 exist */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
+ rec_sec = 59; |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
|
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
/* minimal sanity check on date */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
- if ((i>=12)||(rec_min>59)||(rec_sec>60)||(rec_year<1990)) |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
+ if ( i >= 12 || rec_min < 0 || rec_min > 59 || |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
+ rec_sec < 0 || rec_sec > 59 || rec_year<1990 || |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
+ rec_day < 0) |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
{ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
total_bad++; /* if a bad date, bump counter */ |
a4adf8cbfa5d
16133922 Move webalizer from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
if (verbose) |