HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: y2k problem in faxcron/recvstats/xferstats



Hello,
Frans wrote:

> -----Original Message-----
> From: owner-flexfax@celestial.com [mailto:owner-flexfax@celestial.com]On
> Behalf Of Frans E. van Dorsselaer
> Sent: Thursday, January 13, 2000 11:59 PM
> To: flexfax@sgi.com
> Cc: bugs@hylafax.org
> Subject: flexfax: y2k problem in faxcron/recvstats/xferstats
> 
> 
> Hello,

<snip bugfix for xferfaxstats>

> The error reports are filtered from faxcron itself, using
> awk.  I'm not good at awk, and I haven't tracked down the
> problem further.
> 
> Bye,
> 
> Frans van Dorsselaer
> frans@bia-bv.demon.nl
> 
> 


here the bugfix for the error reports filtered by faxcron:
******* original function acc from line 185 

function acct(dest, status, datetime, commid)
{
    split(datetime, a, " ");
    split(a[1], b, "/");
    t = b[3] b[1] b[2] a[2];
    if (t < LASTt)
	return;
    status = cleanup(status);

******* change this to:

function acct(dest, status, datetime, commid)
{
    split(datetime, a, " ");
    split(a[1], b, "/");
    if (b[3] < 80)
	b[3] += 100;
    else
        b[3] = 0 b[3];	
    split(a[2], ccc, ":");
    t = b[3] b[1] b[2] ccc[1] ccc[2];
    if (t < LASTt)
	return;
    status = cleanup(status);

and change in the "main"-programm the lines from line 250
******* original follows:
		  months["11"] = "Nov"; months["12"] = "Dec";

		  split(LASTRUN, a, " ");
		  split(a[1], b, "/");
		  LASTt = b[3] b[1] b[2] a[2];
		  setupToLower();
		}

****** change to:
		  months["11"] = "Nov"; months["12"] = "Dec";

		  split(LASTRUN, a, " ");
		  split(a[1], b, "/");
		  if (b[3] < 80)
		      b[3] += 100;
		  else
		      b[3] = 0 b[3];
		      
		  split(a[2], ccc, ":");
		  LASTt = b[3] b[1] b[2] ccc[1] ccc[2];
		  setupToLower();
		}

that's all. Now it will work.

Stefan Ille
stefan.ille@designa.de





Project hosted by iFAX Solutions