[Mod_log_sql] code review
Robert Schulze
rs at bytecamp.net
Mon Feb 18 04:15:50 EST 2008
Hi
last weekend I spent a lot of time with reviewing the code in
mod_log_sql. What I often noticed, were wrong string-assignments.
Except in declaration, one can't assign a string with the help of '='.
The same problem is in some of the extraction-functions, which 'return
"-"', without allocating space for the string.
I fixed all those non-allocated string occurances in mod_log_sql.c,
functions*.h and mod_log_sql_mysql.c
I've also rewritten that big makro DO_MERGE_ARRAY in mod_log_sql.c to a
function and cleaned up the code a little bit, especially in
mod_log_sql_transaction.
The patch against 1.101 is available here (which also includes the
one-liner to set the apr_pool_cleanup_null):
http://www.rob-schulze.de/publikationen/frickelworx/mod_log_sql-patch/diff
Don't be afraid, most of it is 'deleting a tab', due to removing
else-statements, in case of a return() in the previous if-statement ;-)
with kind regards,
Robert Schulze
--
/7\ bytecamp GmbH
Geschwister-Scholl-Str. 10, 14776 Brandenburg a.d. Havel
HRB15752, Amtsgericht Potsdam, Geschaeftsfuehrer:
Bjoern Barnekow, Frank Rosenbaum, Sirko Zidlewitz
tel +49 3381 79637-0 werktags 10-12,13-17 Uhr, fax +49 3381 79637-20
mail rs at bytecamp.net, web http://bytecamp.net/
More information about the Mod_log_sql
mailing list