diff options
author | Edward Rudd | 2004-01-20 20:36:41 +0000 |
---|---|---|
committer | Edward Rudd | 2004-01-20 20:36:41 +0000 |
commit | f26e43417ed614aa5e6c328f1610f1fca4708e99 (patch) | |
tree | 5709e1e03ebe792aee28a33fa57eff22a37962df /mod_log_sql.c | |
parent | a5d838fab50df5d39396470b2bc9bf25e81cad53 (diff) |
make sure I initialize the hash
Diffstat (limited to 'mod_log_sql.c')
-rw-r--r-- | mod_log_sql.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mod_log_sql.c b/mod_log_sql.c index 95c8c62..498e717 100644 --- a/mod_log_sql.c +++ b/mod_log_sql.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Header: /home/cvs/mod_log_sql/mod_log_sql.c,v 1.9 2004/01/20 20:33:20 urkle Exp $ */ | 1 | /* $Header: /home/cvs/mod_log_sql/mod_log_sql.c,v 1.10 2004/01/20 20:36:41 urkle Exp $ */ |
2 | /* --------* | 2 | /* --------* |
3 | * DEFINES * | 3 | * DEFINES * |
4 | * --------*/ | 4 | * --------*/ |
@@ -122,7 +122,7 @@ typedef struct { | |||
122 | int string_contents; /* if it returns a string */ | 122 | int string_contents; /* if it returns a string */ |
123 | } log_sql_item; | 123 | } log_sql_item; |
124 | 124 | ||
125 | apr_hash_t *log_sql_hash; | 125 | static apr_hash_t *log_sql_hash; |
126 | 126 | ||
127 | /* Registration Function for extract functions */ | 127 | /* Registration Function for extract functions */ |
128 | LOGSQL_DECLARE(void) log_sql_register_item(apr_pool_t *p, char *key, | 128 | LOGSQL_DECLARE(void) log_sql_register_item(apr_pool_t *p, char *key, |
@@ -688,6 +688,8 @@ static void log_sql_pre_config(server_rec *s, apr_pool_t *p) | |||
688 | global_config.socketfile = "/tmp/mysql.sock"; | 688 | global_config.socketfile = "/tmp/mysql.sock"; |
689 | if (!global_config.tcpport) | 689 | if (!global_config.tcpport) |
690 | global_config.tcpport = 3306; | 690 | global_config.tcpport = 3306; |
691 | if (!log_sql_hash) | ||
692 | log_sql_hash = apr_hash_make(p); | ||
691 | 693 | ||
692 | /* Register handlers */ | 694 | /* Register handlers */ |
693 | log_sql_register_item(p,"A", extract_agent, "agent", 1, 1); | 695 | log_sql_register_item(p,"A", extract_agent, "agent", 1, 1); |
@@ -929,7 +931,7 @@ static int log_sql_transaction(request_rec *orig) | |||
929 | * what the user has configured. */ | 931 | * what the user has configured. */ |
930 | for (i = 0; i < length; i++) { | 932 | for (i = 0; i < length; i++) { |
931 | j = 0; | 933 | j = 0; |
932 | 934 | ||
933 | while (log_sql_item_keys[j].ch) { | 935 | while (log_sql_item_keys[j].ch) { |
934 | 936 | ||
935 | if (log_sql_item_keys[j].ch == cls->transfer_log_format[i]) { | 937 | if (log_sql_item_keys[j].ch == cls->transfer_log_format[i]) { |