syslog-ng--mainline: Forward port: added stats counter orphaning to fix "duplicate stats counter message" for program destinations
Link: <http://intra.balabit/cgi-bin/viewarch.cgi/devel@balabit.hu--other-1/syslog-ng--mainline--2.1--patch-11> Revision: syslog-ng--mainline--2.1--patch-11 Archive: devel@balabit.hu--other-1 Creator: Balazs Scheidler <bazsi@balabit.hu> Date: Wed Oct 25 10:15:48 CEST 2006 Standard-date: 2006-10-25 08:15:48 GMT Modified-files: ChangeLog src/logmsg.c src/logwriter.c src/main.c src/stats.c src/stats.h New-patches: devel@balabit.hu--other-1/syslog-ng--mainline--2.0--patch-77 devel@balabit.hu--other-1/syslog-ng--mainline--2.1--patch-11 Summary: Forward port: added stats counter orphaning to fix "duplicate stats counter message" for program destinations Keywords: 2006-09-11 Balazs Scheidler <bazsi@balabit.hu> * src/logwriter.c (log_writer_deinit): call stats_orphan_counter, (log_writer_free): removed stats_unregister_counter, fixed a memory leak by freeing all elements in the logwriter queue, (log_writer_options_init): fixed a possible memory leak by freeing the option structure contents before overwriting it with new values, * src/main.c (main_loop_run): added stats_cleanup_orphans() call * src/stats.c (stats_counter_free): new function, (stats_register_counter): added special case for orphaned counters, save "shared" value in the StatsCounter structure, (stats_orphan_counter): new function, orphanes a counter that can thus be reused by a new configuration upon the receiption of a HUP signal, (stats_unregister_counter): use stats_counter_free instead of open-coding it, (stats_cleanup_orphans): free all orphaned counters, to be called after a reload Diff stats: ChangeLog | 36 +++++++++++++++++++++ src/logmsg.c | 1 src/logwriter.c | 20 ++++++++++-- src/main.c | 1 src/stats.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++------- src/stats.h | 5 ++- 6 files changed, 140 insertions(+), 15 deletions(-)
participants (1)
-
bazsi@balabit.hu