summaryrefslogtreecommitdiffstats
path: root/mod_log_sql.c
diff options
context:
space:
mode:
authorGravatar Edward Rudd 2004-03-05 00:30:58 +0000
committerGravatar Edward Rudd 2004-03-05 00:30:58 +0000
commit6ad58b7d5c5d0ca53ec644021f0108811bceac4a (patch)
tree5556cfe9eed0c379b875d38eeac556a32f8b5f6d /mod_log_sql.c
parenta3d0fadb9bbc2a70cac6d46b768822b1875a1811 (diff)
updated compatability header for Apache 1.3
Changed log_error routing for Apache 1.3 to include APLOG_NOERRNO re-added quarter second delay between reconnect and query retry. updated makefile to generate HTML version of docbook docs. added comments to mod_log_sql_mysql.c updated documentation about --with-db-inc configure option
Diffstat (limited to 'mod_log_sql.c')
-rw-r--r--mod_log_sql.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mod_log_sql.c b/mod_log_sql.c
index 754a224..666ac46 100644
--- a/mod_log_sql.c
+++ b/mod_log_sql.c
@@ -1,4 +1,4 @@
1/* $Id: mod_log_sql.c,v 1.19 2004/03/04 05:43:20 urkle Exp $ */ 1/* $Id: mod_log_sql.c,v 1.20 2004/03/05 00:30:58 urkle Exp $ */
2 2
3#if defined(WITH_APACHE20) 3#if defined(WITH_APACHE20)
4# include "apache20.h" 4# include "apache20.h"
@@ -459,6 +459,20 @@ static logsql_query_ret safe_sql_insert(request_rec *r, logsql_tabletype table_t
459 /* re-open the connection and try again */ 459 /* re-open the connection and try again */
460 if (log_sql_opendb_link(r->server) != LOGSQL_OPENDB_FAIL) { 460 if (log_sql_opendb_link(r->server) != LOGSQL_OPENDB_FAIL) {
461 log_error(APLOG_MARK,APLOG_ERR,r->server,"db reconnect successful"); 461 log_error(APLOG_MARK,APLOG_ERR,r->server,"db reconnect successful");
462# if defined(WITH_APACHE20)
463 apr_sleep(apr_time_from_sec(0.25)); /* pause for a quarter second */
464# elif defined(WITH_APACHE13)
465 {
466 struct timespec delay, remainder;
467 int nanoret;
468 delay.tv_sec = 0;
469 delay.tv_nsec = 250000000; /* pause for a quarter second */
470 nanoret = nanosleep(&delay, &remainder);
471 if (nanoret && errno != EINTR) {
472 log_error(APLOG_MARK,APLOG_ERR,r->server,"nanosleep unsuccessful");
473 }
474 }
475# endif
462 result = log_sql_mysql_query(r,&global_config.db,query); 476 result = log_sql_mysql_query(r,&global_config.db,query);
463 if (result == LOGSQL_QUERY_SUCCESS) { 477 if (result == LOGSQL_QUERY_SUCCESS) {
464 return LOGSQL_QUERY_SUCCESS; 478 return LOGSQL_QUERY_SUCCESS;