author | Rich Burridge <rich.burridge@oracle.com> |
Fri, 09 Aug 2013 12:58:20 -0700 | |
branch | s11-update |
changeset 2723 | 138732f62341 |
permissions | -rw-r--r-- |
2723
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
--- webalizer-2.21-02/webalizer.c 2009-01-13 06:35:54.000000000 +0100 |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
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 |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
@@ -737,10 +737,16 @@ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
rec_sec =atoi(&log_rec.datetime[19]); /* get second number */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
|
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
/* Kludge for Netscape server time (0-24?) error */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
- if (rec_hour>23) rec_hour=0; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
+ if (rec_hour > 23) |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
+ rec_hour=0; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
+ /* Handle leap seconds (AC 2004) */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
+ if (rec_sec > 59 && rec_sec < 62) /* 23:59:60/61 exist */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
+ rec_sec = 59; |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
|
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
/* minimal sanity check on date */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
- if ((i>=12)||(rec_min>59)||(rec_sec>60)||(rec_year<1990)) |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
+ if ( i >= 12 || rec_min < 0 || rec_min > 59 || |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
+ rec_sec < 0 || rec_sec > 59 || rec_year<1990 || |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
+ rec_day < 0) |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
{ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
total_bad++; /* if a bad date, bump counter */ |
138732f62341
17219320 Various Userland components should be back-ported to 11.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
if (verbose) |