Package: webalizer
Version: 2.01.10-32
Tags: patch
Severity: important
The Debian version of webalizer includes support for incoming and
outgoing bytes effectively transfered. These values are provided by
apache's mod_logio, which is included in Debian as well.
However the totals calculated by webalizer for these fields (described
as kB In and kB Out) are wrong because of two bus. First, the incoming
value is clobbered by the outgoing one, due to a typo. Second, both
values are not read from the webalizer.current state file due to a
format mismatch in the writing/reading functions.
These bugs are important if you need the incoming and outgoing flux
values. Note also that the standard kB F is nearly meaningless for a
web server because it doesn't represent what is effectively sent
through the net; it just shows the Content-Length of the object being
sent.
The following patch fixes these problems.
diff -ur webalizer-2.01.10/hashtab.c webalizer-2.01.10-patch/hashtab.c
--- webalizer-2.01.10/hashtab.c 2008-05-21 20:41:04.000000000 -0300
+++ webalizer-2.01.10-patch/hashtab.c 2008-05-21 19:15:51.000000000 -0300
@@ -177,7 +177,7 @@
nptr->count = count;
nptr->files = file;
nptr->xfer = xfer;
- nptr->ixfer = oxfer;
+ nptr->ixfer = ixfer;
nptr->oxfer = oxfer;
nptr->next = NULL;
htab[hash(str)] = nptr;
@@ -244,7 +244,7 @@
nptr->count = count;
nptr->files = file;
nptr->xfer = xfer;
- nptr->ixfer = oxfer;
+ nptr->ixfer = ixfer;
nptr->oxfer = oxfer;
nptr->next = htab[hash(str)];
htab[hash(str)]=nptr;
diff -ur webalizer-2.01.10/preserve.c webalizer-2.01.10-patch/preserve.c
--- webalizer-2.01.10/preserve.c 2008-05-21 20:41:04.000000000 -0300
+++ webalizer-2.01.10-patch/preserve.c 2008-05-21 20:47:07.000000000 -0300
@@ -307,7 +307,7 @@
hptr=sm_htab[i];
while (hptr!=NULL)
{
- snprintf(buffer,sizeof(buffer),"%s\n%d %lld %lld %.0f %lld %lld\n%s
%.0f %.0f\n",
+ snprintf(buffer,sizeof(buffer),"%s\n%d %lld %lld %.0f %lld %lld %.0f
%.0f\n%s\n",
hptr->string,
hptr->flag,
hptr->count,
@@ -315,9 +315,9 @@
hptr->xfer,
hptr->visit,
hptr->tstamp,
- (hptr->lasturl==blank_str)?"-":hptr->lasturl,
hptr->ixfer,
- hptr->oxfer);
+ hptr->oxfer,
+ (hptr->lasturl==blank_str)?"-":hptr->lasturl);
if (fputs(buffer,fp)==EOF) return 1; /* error exit */
hptr=hptr->next;
}
@@ -331,7 +331,7 @@
hptr=sd_htab[i];
while (hptr!=NULL)
{
- snprintf(buffer,sizeof(buffer),"%s\n%d %lld %lld %.0f %lld %lld\n%s
%.0f %.0f\n",
+ snprintf(buffer,sizeof(buffer),"%s\n%d %lld %lld %.0f %lld %lld %.0f
%.0f\n%s\n",
hptr->string,
hptr->flag,
hptr->count,
@@ -339,9 +339,9 @@
hptr->xfer,
hptr->visit,
hptr->tstamp,
- (hptr->lasturl==blank_str)?"-":hptr->lasturl,
hptr->ixfer,
- hptr->oxfer);
+ hptr->oxfer,
+ (hptr->lasturl==blank_str)?"-":hptr->lasturl);
if (fputs(buffer,fp)==EOF) return 1;
hptr=hptr->next;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]