Ticket #27: innd-status-header.patch

File innd-status-header.patch, 1.9 KB (added by eagle, 14 years ago)

Patch from 2000

Line 
1*** innd/status.c.orig  Wed Sep 20 13:03:09 2000
2--- innd/status.c       Fri Nov 17 16:45:42 2000
3***************
4*** 9,15 ****
5  #define MIN_REFRESH   60  /* 1 min */
6  #define HTML_STATUS
7  #if defined(HTML_STATUS)
8! #define STATUS_FILE   "inn_status.html"       /* will be in pathhttp */
9  #else
10  #define STATUS_FILE   "inn.status"            /* will be in pathlog */
11  #endif
12--- 9,17 ----
13  #define MIN_REFRESH   60  /* 1 min */
14  #define HTML_STATUS
15  #if defined(HTML_STATUS)
16! #define STATUS_FILE           "inn_status.html"       /* will be in pathhttp */
17! #define STATUS_HEADER_FILE    "header.html"           /* will be in pathhttp */
18! char *HTML_Header = NULL;
19  #else
20  #define STATUS_FILE   "inn.status"            /* will be in pathlog */
21  #endif
22***************
23*** 121,131 ****
24 
25  #if defined(HTML_STATUS)
26    /* HTML Header */
27-
28    fprintf (F,"<HTML>\n<HEAD>\n<META HTTP-EQUIV=\"Refresh\" CONTENT=\"%d;\">\n",
29!          innconf->status < MIN_REFRESH ? MIN_REFRESH : innconf->status);
30!   fprintf (F, "<TITLE>%s: incoming feeds</TITLE>\n", innconf->pathhost);
31!   fprintf (F, "</HEAD>\n<BODY>\n<PRE>\n") ;
32  #endif /* defined(HTML_STATUS) */
33 
34    fprintf (F, "%s\n", inn_version_string);
35--- 123,143 ----
36 
37  #if defined(HTML_STATUS)
38    /* HTML Header */
39    fprintf (F,"<HTML>\n<HEAD>\n<META HTTP-EQUIV=\"Refresh\" CONTENT=\"%d;\">\n",
40!            innconf->status < MIN_REFRESH ? MIN_REFRESH : innconf->status);
41!   fprintf (F, "<TITLE>%s: incoming feeds</TITLE>\n</HEAD>\n",
42!            innconf->pathhost);
43!   if (HTML_Header == NULL) {
44!     sprintf (TempString, "%s/%s", innconf->pathhttp, STATUS_HEADER_FILE);
45!     if (HTML_Header = ReadInFile(TempString, NULL))
46!       goto Write_HTML_Header;
47!     fputs ("<BODY BGCOLOR=\"F0F0F0\" TEXT=\"#000000\">\n", F);
48!   }
49!   else {
50!   Write_HTML_Header:
51!     fputs(HTML_Header, F);
52!   }
53!   fputs("<PRE>\n", F) ;
54  #endif /* defined(HTML_STATUS) */
55 
56    fprintf (F, "%s\n", inn_version_string);