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