Fix long-standing bug in xplot's parsing of timevals, which causes
tcpdump2xplot output to show as starting at (in PST) 16:00:00, and for time to wrap on long traces. Re-submitted to Tim Shepard for inclusion in the next release.
This commit is contained in:
parent
16e1a66971
commit
d0add27bcf
2 changed files with 32 additions and 0 deletions
16
graphics/xplot/patches/patch-ad
Normal file
16
graphics/xplot/patches/patch-ad
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- timeval.c.DIST Fri Jun 28 12:41:21 1996
|
||||
+++ timeval.c Mon Mar 30 19:58:50 1998
|
||||
@@ -102,6 +102,13 @@
|
||||
r.t.tv_sec = atoi(s);
|
||||
while (isdigit(*s)) s++;
|
||||
|
||||
+ while (*s == ':') {
|
||||
+ s++;
|
||||
+ r.t.tv_sec *= 60;
|
||||
+ r.t.tv_sec += atoi(s);
|
||||
+ while (isdigit(*s)) s++;
|
||||
+ }
|
||||
+
|
||||
if (*s == '.') {
|
||||
s++;
|
||||
r.t.tv_usec = atoi(s);
|
16
x11/xplot/patches/patch-ad
Normal file
16
x11/xplot/patches/patch-ad
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- timeval.c.DIST Fri Jun 28 12:41:21 1996
|
||||
+++ timeval.c Mon Mar 30 19:58:50 1998
|
||||
@@ -102,6 +102,13 @@
|
||||
r.t.tv_sec = atoi(s);
|
||||
while (isdigit(*s)) s++;
|
||||
|
||||
+ while (*s == ':') {
|
||||
+ s++;
|
||||
+ r.t.tv_sec *= 60;
|
||||
+ r.t.tv_sec += atoi(s);
|
||||
+ while (isdigit(*s)) s++;
|
||||
+ }
|
||||
+
|
||||
if (*s == '.') {
|
||||
s++;
|
||||
r.t.tv_usec = atoi(s);
|
Loading…
Reference in a new issue