innfeed patches to fix html stats output
inn-workers at 2bb49e3f.mozone.net
inn-workers at 2bb49e3f.mozone.net
Tue Jul 9 12:14:43 UTC 2002
Can someone please commit these? It should bring us one step closer to having
all browsers be able to view the generated stats. As it stands, without
this patch, Opera does not honor the <pre>'s because per spec, a <pre>
must not contain header tags or like, not to mention the lack of a head/body
statement :)
Although the patch is against the 05/11 snapshot, it should (i'd hope)
apply cleanly to the current snap (oh wait a minute, do we even have a
current snap these days other than via cvsup? :/)
Thanks!
-mohan
PS: Katsuhiro-san, that "ovmmap is null" thing is biting me in the butt
I take it there hasn't been a fix thus far for it, so if you are interested
in a host to debug with/on ... :) [buffindexed (FweeBSD)]
PS2: Anyone else notice their nnrpds chewing up 60-100megs each with
timecaf + tradindexed?
--->8--snip-here--8<---
diff -ru inn-CURRENT-20020511/innfeed/host.c ../inn-CURRENT-20020511/innfeed/host.c
--- inn-CURRENT-20020511/innfeed/host.c Sat May 11 02:00:43 2002
+++ ../inn-CURRENT-20020511/innfeed/host.c Sat May 18 15:24:23 2002
@@ -421,7 +421,6 @@
else
genHtml = GEN_HTML ;
-
if (getString (topScope,"status-file",&p,NO_INHERIT))
{
hostSetStatusFile (p) ;
@@ -3043,7 +3042,15 @@
strcpy (timeString,ctime (&now)) ;
if (genHtml)
- fprintf (fp,"<HTML><META HTTP-EQUIV=\"Refresh\" CONTENT=\"300;\"><PRE>\n\n") ;
+ {
+ fprintf (fp, "<HTML>\n"
+ "<HEAD>\n"
+ "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"300;\">\n"
+ "</HEAD>\n"
+ "<BODY>\n") ;
+ fprintf (fp, "\n");
+ fprintf (fp, "<PRE>\n");
+ }
fprintf (fp,"%s\npid %d started %s\nUpdated: %s",
versionInfo,(int) myPid,startTime,timeString) ;
@@ -3054,11 +3061,13 @@
if (genHtml)
{
- fprintf (fp,"<UL>");
+ fprintf (fp, "</PRE>\n");
+ fprintf (fp,"<UL>\n");
for (h = gHostList ; h != NULL ; h = h->next)
- fprintf (fp,"<LI><A href=\"#%s\">%s</A></LI>",
+ fprintf (fp,"<LI><A href=\"#%s\">%s</A></LI>\n",
h->params->peerName, h->params->peerName);
fprintf (fp,"</UL>\n\n");
+ fprintf (fp,"<PRE>\n");
}
mainLogStatus (fp) ;
@@ -3078,7 +3087,7 @@
backlog factor: 1.1
*/
fprintf(fp,"%sDefault peer configuration parameters:%s\n",
- genHtml ? "<H2>" : "", genHtml ? "</H2>" : "") ;
+ genHtml ? "<B>" : "", genHtml ? "</B>" : "") ;
fprintf(fp," article timeout: %-5d initial connections: %d\n",
defaultParams->articleTimeout,
defaultParams->initialConnections) ;
@@ -3113,7 +3122,7 @@
fprintf (fp,"\n") ;
fprintf(fp,"%sglobal (process)%s\n",
- genHtml ? "<H2>" : "", genHtml ? "</H2>" : "") ;
+ genHtml ? "<B>" : "", genHtml ? "</B>" : "") ;
fprintf (fp, " seconds: %ld\n", sec) ;
if (sec == 0) sec = 1 ;
@@ -3165,7 +3174,11 @@
hostPrintStatus (h,fp) ;
if (genHtml)
- fprintf (fp,"</PRE></HTML>\n") ;
+ {
+ fprintf (fp,"</PRE>\n") ;
+ fprintf (fp,"</BODY>\n") ;
+ fprintf (fp,"</HTML>\n") ;
+ }
fclose (fp) ;
}
@@ -3213,7 +3226,7 @@
ASSERT (fp != NULL) ;
if (genHtml)
- fprintf (fp,"<A name=\"%s\"><H2>%s</H2></A>",host->params->peerName,
+ fprintf (fp,"<A name=\"%s\"><B>%s</B></A>",host->params->peerName,
host->params->peerName);
else
fprintf (fp,"%s",host->params->peerName);
diff -ru inn-CURRENT-20020511/innfeed/innlistener.c ../inn-CURRENT-20020511/innfeed/innlistener.c
--- inn-CURRENT-20020511/innfeed/innlistener.c Sat May 11 02:00:43 2002
+++ ../inn-CURRENT-20020511/innfeed/innlistener.c Sat May 18 14:48:06 2002
@@ -108,7 +108,7 @@
void listenerLogStatus (FILE *fp)
{
fprintf (fp,"%sListener Status:%s\n",
- genHtml ? "<H2>" : "", genHtml ? "</H2>" : "") ;
+ genHtml ? "<B>" : "", genHtml ? "</B>" : "") ;
fprintf (fp," Dropped article file: %s\n",dropArtFile) ;
fprintf (fp," Dropped article count: %ld\n",(long) droppedCount) ;
fprintf (fp,"\n") ;
diff -ru inn-CURRENT-20020511/innfeed/main.c ../inn-CURRENT-20020511/innfeed/main.c
--- inn-CURRENT-20020511/innfeed/main.c Sat May 11 02:00:44 2002
+++ ../inn-CURRENT-20020511/innfeed/main.c Sat May 18 14:47:55 2002
@@ -978,7 +978,7 @@
void mainLogStatus (FILE *fp)
{
fprintf (fp,"%sGlobal configuration parameters:%s\n",
- genHtml ? "<H2>" : "", genHtml ? "</H2>" : "") ;
+ genHtml ? "<B>" : "", genHtml ? "</B>" : "") ;
fprintf (fp," Mode: ") ;
if (InputFile != NULL)
fprintf (fp,"Funnel file") ;
diff -ru inn-CURRENT-20020511/innfeed/tape.c ../inn-CURRENT-20020511/innfeed/tape.c
--- inn-CURRENT-20020511/innfeed/tape.c Sat May 11 02:00:44 2002
+++ ../inn-CURRENT-20020511/innfeed/tape.c Sat May 18 14:47:45 2002
@@ -516,7 +516,7 @@
void tapeLogGlobalStatus (FILE *fp)
{
fprintf (fp,"%sBacklog file global values:%s\n",
- genHtml ? "<H2>" : "", genHtml ? "</H2>" : "") ;
+ genHtml ? "<B>" : "", genHtml ? "</B>" : "") ;
fprintf (fp," directory: %s\n",tapeDirectory) ;
fprintf (fp," rotate period: %-3ld seconds\n",(long) rotatePeriod) ;
fprintf (fp,"checkpoint period: %-3ld seconds\n",(long) tapeCkPtPeriod) ;
More information about the inn-workers
mailing list