SOURCES: pound-logfile.patch - add the config.c changes too
glen
glen at pld-linux.org
Thu Jan 8 17:52:23 CET 2009
Author: glen Date: Thu Jan 8 16:52:23 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add the config.c changes too
---- Files affected:
SOURCES:
pound-logfile.patch (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/pound-logfile.patch
diff -u SOURCES/pound-logfile.patch:1.3 SOURCES/pound-logfile.patch:1.4
--- SOURCES/pound-logfile.patch:1.3 Thu Jan 8 17:24:08 2009
+++ SOURCES/pound-logfile.patch Thu Jan 8 17:52:18 2009
@@ -1,15 +1,15 @@
---- Pound-2.4.3/config.c 2008-12-11 00:55:24.275734964 +0200
-+++ Pound-2.4.3-logfile/config.c 2008-12-11 00:22:22.509353295 +0200
+--- Pound-2.4.3-logfile/config.c 2008-12-11 00:22:22.509353295 +0200
++++ Pound-2.4.3.logs/config.c 2009-01-08 17:47:08.523739629 +0200
@@ -72,7 +72,7 @@
};
#endif
-static regex_t Empty, Comment, User, Group, RootJail, Daemon, LogFacility, LogLevel, Alive, SSLEngine, Control;
-+static regex_t Empty, Comment, User, Group, RootJail, Daemon, LogFacility, LogFile, LogLevel, Alive, SSLEngine, Control;
++static regex_t Empty, Comment, User, Group, RootJail, Daemon, LogFacility, LogFile, LogLevel, ErrorLog, Alive, SSLEngine, Control;
static regex_t ListenHTTP, ListenHTTPS, End, Address, Port, Cert, xHTTP, Client, CheckURL;
static regex_t Err414, Err500, Err501, Err503, MaxRequest, HeadRemove, RewriteLocation, RewriteDestination;
static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr;
-@@ -1104,6 +1104,14 @@
+@@ -1104,6 +1104,18 @@
def_facility = facilitynames[i].c_val;
break;
}
@@ -19,36 +19,45 @@
+ logmsg(LOG_ERR, "line %d: LogFile config: out of memory - aborted", n_lin);
+ exit(1);
+ }
-+ // force facility to log stdout internally.
-+ def_facility = -1;
++ } else if(!regexec(&ErrorLog, lin, 4, matches, 0)) {
++ lin[matches[1].rm_eo] = '\0';
++ if((error_log = strdup(lin + matches[1].rm_so)) == NULL) {
++ logmsg(LOG_ERR, "line %d: ErrorLog config: out of memory - aborted", n_lin);
++ exit(1);
++ }
} else if(!regexec(&Grace, lin, 4, matches, 0)) {
grace = atoi(lin + matches[1].rm_so);
} else if(!regexec(&LogLevel, lin, 4, matches, 0)) {
-@@ -1204,6 +1212,7 @@
+@@ -1204,7 +1216,9 @@
|| regcomp(&RootJail, "^[ \t]*RootJail[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Daemon, "^[ \t]*Daemon[ \t]+([01])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&LogFacility, "^[ \t]*LogFacility[ \t]+([a-z0-9-]+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
+ || regcomp(&LogFile, "^[ \t]*LogFile[ \t]+(.+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&LogLevel, "^[ \t]*LogLevel[ \t]+([0-5])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
++ || regcomp(&ErrorLog, "^[ \t]*ErrorLog[ \t]+(.+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Grace, "^[ \t]*Grace[ \t]+([0-9]+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Alive, "^[ \t]*Alive[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
-@@ -1329,6 +1338,7 @@
+ || regcomp(&SSLEngine, "^[ \t]*SSLEngine[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
+@@ -1329,6 +1343,8 @@
group = NULL;
root_jail = NULL;
ctrl_name = NULL;
+ log_file = NULL;
++ error_log = NULL;
alive_to = 30;
daemonize = 1;
-@@ -1358,6 +1368,7 @@
+@@ -1358,7 +1374,9 @@
regfree(&RootJail);
regfree(&Daemon);
regfree(&LogFacility);
+ regfree(&LogFile);
regfree(&LogLevel);
++ regfree(&ErrorLog);
regfree(&Grace);
regfree(&Alive);
---- Pound-2.4.3-logfile/pound.c 2008-12-11 00:51:21.169092412 +0200
+ regfree(&SSLEngine);
+--- Pound-2.4.3.logs/pound.c 2009-01-08 18:03:00.316961385 +0200
+++ Pound-2.4.3.logs/pound.c 2009-01-08 18:03:00.316961385 +0200
@@ -33,6 +33,8 @@
*group, /* group to run as */
@@ -97,7 +106,7 @@
*ctrl_name; /* control socket name */
extern int alive_to, /* check interval for resurrection */
---- Pound-2.4.3/svc.c 2009-01-08 18:20:02.970625040 +0200
+--- Pound-2.4.3.logs/svc.c 2009-01-08 18:16:21.407506564 +0200
+++ Pound-2.4.3.logs/svc.c 2009-01-08 18:16:21.407506564 +0200
@@ -176,13 +176,25 @@
char buf[MAXBUF + 1];
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pound-logfile.patch?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list