Lines 1-92
Link Here
|
1 |
--- mod_log_mysql.c.orig Fri Feb 1 11:02:55 2002 |
1 |
--- mod_log_mysql.c.orig Mon Jun 10 21:57:51 2002 |
2 |
+++ mod_log_mysql.c Fri Feb 1 11:03:36 2002 |
2 |
+++ mod_log_mysql.c Mon Jun 10 21:58:12 2002 |
3 |
@@ -31,7 +31,7 @@ |
3 |
@@ -41,7 +41,7 @@ |
|
|
4 |
* -------------*/ |
4 |
|
5 |
|
5 |
|
6 |
/* Declare ourselves so the configuration routines can find and know us. */ |
6 |
/* DECLARATIONS */ |
|
|
7 |
-module mysql_log_module; |
7 |
-module mysql_log_module; |
8 |
+module log_mysql_module; |
8 |
+module log_mysql_module; |
9 |
|
9 |
|
10 |
MYSQL sql_server, *mysql_log = NULL; |
10 |
/* The contents of these are known 'Apache wide' and are not variable |
11 |
|
11 |
* on a per-virtual-server basis. Every virtual server 'knows' the |
12 |
@@ -539,7 +539,7 @@ |
12 |
@@ -320,7 +320,7 @@ |
|
|
13 |
char *isvalid; |
14 |
char *cookiebuf; |
15 |
|
16 |
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module); |
17 |
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module); |
18 |
|
19 |
#ifdef DEBUG |
20 |
ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"watching for cookie '%s'", cls->cookie_name); |
21 |
@@ -509,7 +509,7 @@ |
22 |
void preserve_entry(request_rec *r, const char *query) |
23 |
{ |
24 |
FILE *fp; |
25 |
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module); |
26 |
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module); |
27 |
|
28 |
fp = pfopen(r->pool, cls->preserve_file, "a"); |
29 |
if (fp == NULL) |
30 |
@@ -548,7 +548,7 @@ |
31 |
* at any time, hence the check. */ |
32 |
if ( retval != 0 ) |
33 |
{ |
34 |
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module); |
35 |
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module); |
36 |
|
37 |
/* Something went wrong, so start by trying to restart the db link. */ |
38 |
ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"attempting reconnect because API said: %s", mysql_error(mysql_log)); |
39 |
@@ -621,7 +621,7 @@ |
13 |
|
40 |
|
14 |
const char *set_referer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) |
41 |
const char *set_log_mysql_cookie(cmd_parms *parms, void *dummy, char *arg) |
15 |
{ |
42 |
{ |
16 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
43 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
17 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
44 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
18 |
|
45 |
|
19 |
cls->referer_table_name = arg; |
46 |
cls->cookie_name = arg; |
20 |
return NULL; |
47 |
return NULL; |
21 |
@@ -548,7 +548,7 @@ |
48 |
@@ -630,7 +630,7 @@ |
22 |
|
49 |
const char *set_log_mysql_preserve_file(cmd_parms *parms, void *dummy, char *arg) |
23 |
const char *set_agent_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) |
|
|
24 |
{ |
50 |
{ |
|
|
51 |
char *pfile; |
25 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
52 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
26 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
53 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
27 |
|
54 |
|
28 |
cls->agent_table_name = arg; |
55 |
pfile = ap_pstrcat(parms->pool, "/tmp/", arg, NULL); |
29 |
return NULL; |
56 |
cls->preserve_file = pfile; |
30 |
@@ -557,7 +557,7 @@ |
57 |
@@ -653,7 +653,7 @@ |
31 |
|
58 |
|
32 |
const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) |
59 |
const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) |
33 |
{ |
60 |
{ |
34 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
61 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
35 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
62 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
36 |
|
63 |
|
37 |
cls->transfer_table_name = arg; |
64 |
if (massvirtual != 0) |
38 |
return NULL; |
65 |
ap_log_error(APLOG_MARK,WARNINGLEVEL,parms->server,"do not set MySQLTransferLogTable when MySQLMassVirtualHosting is On. Ignoring."); |
39 |
@@ -566,7 +566,7 @@ |
66 |
@@ -664,7 +664,7 @@ |
40 |
|
67 |
|
41 |
const char *set_transfer_log_format(cmd_parms *parms, void *dummy, char *arg) |
68 |
const char *set_mysql_transfer_log_format(cmd_parms *parms, void *dummy, char *arg) |
42 |
{ |
69 |
{ |
43 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
70 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
44 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
71 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
45 |
|
72 |
|
46 |
cls->transfer_log_format = arg; |
73 |
cls->transfer_log_format = arg; |
47 |
return NULL; |
74 |
return NULL; |
48 |
@@ -604,7 +604,7 @@ |
75 |
@@ -680,7 +680,7 @@ |
|
|
76 |
const char *add_referer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg) |
49 |
{ |
77 |
{ |
50 |
char **addme; |
78 |
char **addme; |
51 |
log_mysql_state *cls = get_module_config(parms->server->module_config, |
79 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
52 |
- &mysql_log_module); |
80 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
53 |
+ &log_mysql_module); |
|
|
54 |
|
81 |
|
55 |
addme = push_array(cls->referer_ignore_list); |
82 |
addme = push_array(cls->referer_ignore_list); |
56 |
*addme = pstrdup(cls->referer_ignore_list->pool, arg); |
83 |
*addme = pstrdup(cls->referer_ignore_list->pool, arg); |
57 |
@@ -615,7 +615,7 @@ |
84 |
@@ -690,7 +690,7 @@ |
|
|
85 |
const char *add_transfer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg) |
58 |
{ |
86 |
{ |
59 |
char **addme; |
87 |
char **addme; |
60 |
log_mysql_state *cls = get_module_config(parms->server->module_config, |
88 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
61 |
- &mysql_log_module); |
89 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
62 |
+ &log_mysql_module); |
|
|
63 |
|
90 |
|
64 |
addme = push_array(cls->transfer_ignore_list); |
91 |
addme = push_array(cls->transfer_ignore_list); |
65 |
*addme = pstrdup(cls->transfer_ignore_list->pool, arg); |
92 |
*addme = pstrdup(cls->transfer_ignore_list->pool, arg); |
66 |
@@ -626,7 +626,7 @@ |
93 |
@@ -700,7 +700,7 @@ |
|
|
94 |
const char *add_remhost_mysql_ignore(cmd_parms *parms, void *dummy, char *arg) |
67 |
{ |
95 |
{ |
68 |
char **addme; |
96 |
char **addme; |
69 |
log_mysql_state *cls = get_module_config(parms->server->module_config, |
97 |
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); |
70 |
- &mysql_log_module); |
98 |
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); |
71 |
+ &log_mysql_module); |
|
|
72 |
|
99 |
|
73 |
addme = push_array(cls->remhost_ignore_list); |
100 |
addme = push_array(cls->remhost_ignore_list); |
74 |
*addme = pstrdup(cls->remhost_ignore_list->pool, arg); |
101 |
*addme = pstrdup(cls->remhost_ignore_list->pool, arg); |
75 |
@@ -702,7 +702,7 @@ |
102 |
@@ -755,10 +755,10 @@ |
|
|
103 |
{ |
104 |
server_rec *s; |
105 |
|
106 |
- log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &mysql_log_module); |
107 |
+ log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &log_mysql_module); |
108 |
|
109 |
for (server_rec *s = main_server; s; s = s->next) { |
110 |
- conf = ap_get_module_config(s->module_config, &mysql_log_module); |
111 |
+ conf = ap_get_module_config(s->module_config, &log_mysql_module); |
112 |
if (conf->transfer_log_format == NULL && s != main_server) { |
113 |
*conf = *main_conf; |
114 |
} |
115 |
@@ -847,7 +847,7 @@ |
116 |
int log_mysql_transaction(request_rec *orig) |
76 |
{ |
117 |
{ |
77 |
char **ptrptr, **ptrptr2; |
118 |
char **ptrptr, **ptrptr2; |
78 |
log_mysql_state *cls = get_module_config(orig->server->module_config, |
119 |
- log_mysql_state *cls = get_module_config(orig->server->module_config, &mysql_log_module); |
79 |
- &mysql_log_module); |
120 |
+ log_mysql_state *cls = get_module_config(orig->server->module_config, &log_mysql_module); |
80 |
+ &log_mysql_module); |
121 |
const char *str; |
81 |
char *str; |
|
|
82 |
const char *referer; |
83 |
request_rec *r; |
122 |
request_rec *r; |
84 |
@@ -856,7 +856,7 @@ |
123 |
|
|
|
124 |
@@ -1042,7 +1042,7 @@ |
85 |
|
125 |
|
86 |
|
126 |
|
87 |
/* The configuration array that sets up the hooks into the module. */ |
127 |
/* The configuration array that sets up the hooks into the module. */ |
88 |
-module mysql_log_module = { |
128 |
-module mysql_log_module = { |
89 |
+module log_mysql_module = { |
129 |
+module log_mysql_module = { |
90 |
STANDARD_MODULE_STUFF, |
130 |
STANDARD_MODULE_STUFF, |
91 |
NULL, /* initializer */ |
131 |
NULL, /* module initializer */ |
92 |
NULL, /* create per-dir config */ |
132 |
NULL, /* create per-dir config */ |