From 141cf421e03092da2c7ded824e6adae973ef4b84 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 31 Aug 2005 06:14:18 +0000 Subject: fix for issue #41 --- diff --git a/CHANGELOG b/CHANGELOG index 552d14e..14afb2a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.101: 2005-02-18? +* fix empty comparison on itemsets for solaris issue #41 + 1.100: 2005-01-11 * fixes for NULL fields (empty request_args) * fixed a mysql reconnect bug diff --git a/mod_log_sql.c b/mod_log_sql.c index 5b86147..d92df49 100644 --- a/mod_log_sql.c +++ b/mod_log_sql.c @@ -666,6 +666,7 @@ static int in_array(apr_array_header_t *ary, const char *elem) /* Parse through cookie lists and merge based on +/- prefixes */ +/* TODO: rewrite as a function */ #define DO_MERGE_ARRAY(parent,child,pool) \ if (apr_is_empty_array(child)) { \ apr_array_cat(child, parent); \ @@ -930,7 +931,7 @@ static int log_sql_transaction(request_rec *orig) i++; } } - if ( itemsets != "" ) { + if ( *itemsets != '\0' ) { note_query = apr_psprintf(r->pool, "insert %s into %s (id, item, val) values %s", /*global_config.insertdelayed?"delayed":*/"", notes_tablename, itemsets); @@ -958,7 +959,7 @@ static int log_sql_transaction(request_rec *orig) i++; } } - if ( itemsets != "" ) { + if ( *itemsets != '\0' ) { hout_query = apr_psprintf(r->pool, "insert %s into %s (id, item, val) values %s", /*global_config.insertdelayed?"delayed":*/"", hout_tablename, itemsets); @@ -987,7 +988,7 @@ static int log_sql_transaction(request_rec *orig) i++; } } - if ( itemsets != "" ) { + if ( *itemsets != '\0' ) { hin_query = apr_psprintf(r->pool, "insert %s into %s (id, item, val) values %s", /*global_config.insertdelayed?"delayed":*/"", hin_tablename, itemsets); @@ -1017,7 +1018,7 @@ static int log_sql_transaction(request_rec *orig) } } - if ( itemsets != "" ) { + if ( *itemsets != '\0' ) { cookie_query = apr_psprintf(r->pool, "insert %s into %s (id, item, val) values %s", /*global_config.insertdelayed?"delayed":*/"", cookie_tablename, itemsets); -- cgit v0.9.2