[Syslog-ng-commit] syslog-ng--mainline: added stats counter
orphaning to fix "duplicate stats counter message" for
program destinations
Balazs Scheidler
bazsi at balabit.hu
Mon Sep 11 11:47:55 CEST 2006
Link: <http://intra.balabit/cgi-bin/viewarch.cgi/devel@balabit.hu--other-1/syslog-ng--mainline--2.0--patch-77>
Revision: syslog-ng--mainline--2.0--patch-77
Archive: devel at balabit.hu--other-1
Creator: Balazs Scheidler <bazsi at balabit.hu>
Date: Mon Sep 11 11:47:54 CEST 2006
Standard-date: 2006-09-11 09:47:54 GMT
Modified-files: ChangeLog src/logmsg.c src/logwriter.c
src/main.c src/stats.c src/stats.h
New-patches: devel at balabit.hu--other-1/syslog-ng--mainline--2.0--patch-77
Summary: added stats counter orphaning to fix "duplicate stats counter message" for program destinations
Keywords:
2006-09-11 Balazs Scheidler <bazsi at 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 | 33 ++++++++++++++++++++
src/logmsg.c | 1
src/logwriter.c | 20 ++++++++++--
src/main.c | 1
src/stats.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++-------
src/stats.h | 5 ++-
6 files changed, 137 insertions(+), 15 deletions(-)
More information about the Syslog-ng-commit
mailing list