From 9240ef253f5adb849f2a0eb400bc80e57634bc07 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 29 Oct 2001 23:03:48 +0000 Subject: new function, ifdef'ed DEBUG_BACKENDS. (main): add SIGUSR2 handler for 2001-10-29 Chris Toshok * wombat.c (dump_backends): new function, ifdef'ed DEBUG_BACKENDS. (main): add SIGUSR2 handler for dump_backends, ifdef'ed DEBUG_BACKENDS. svn path=/trunk/; revision=14375 --- wombat/ChangeLog | 6 ++++++ wombat/wombat.c | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/wombat/ChangeLog b/wombat/ChangeLog index a76545aa3a..b9cf6592a6 100644 --- a/wombat/ChangeLog +++ b/wombat/ChangeLog @@ -1,3 +1,9 @@ +2001-10-29 Chris Toshok + + * wombat.c (dump_backends): new function, ifdef'ed DEBUG_BACKENDS. + (main): add SIGUSR2 handler for dump_backends, ifdef'ed + DEBUG_BACKENDS. + 2001-10-22 Ettore Perazzoli * wombat.c (main): Register the public ConfigDatabase interface diff --git a/wombat/wombat.c b/wombat/wombat.c index f7fbc9227c..fba9b9e898 100644 --- a/wombat/wombat.c +++ b/wombat/wombat.c @@ -9,7 +9,14 @@ #include #endif +/* define this if you need/want to be able to send USR2 to wombat and + get a list of the active backends */ +/*#define DEBUG_BACKENDS*/ + #include +#ifdef DEBUG_BACKENDS +#include +#endif #include #include #include @@ -220,6 +227,15 @@ init_bonobo (int *argc, char **argv) } } +#ifdef DEBUG_BACKENDS +static void +dump_backends (int signal) +{ + pas_book_factory_dump_active_backends (pas_book_factory); + cal_factory_dump_active_backends (cal_factory); +} +#endif + int main (int argc, char **argv) { @@ -230,6 +246,10 @@ main (int argc, char **argv) g_message ("Starting wombat"); +#ifdef DEBUG_BACKENDS + signal (SIGUSR2, dump_backends); +#endif + init_bonobo (&argc, argv); setup_vfs (argc, argv); -- cgit