From bf81b551fa94e438b97bc4c7d1613ec2923a6b48 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 28 Mar 2011 10:57:39 +0200 Subject: [PATCH] Add mtrace start/stop. Requires MTRACE define --- src/pazpar2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pazpar2.c b/src/pazpar2.c index 6680662..d6423a6 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -35,6 +35,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +// #define MTRACE +#ifdef MTRACE +#include +#endif + static struct conf_config *sc_stop_config = 0; void child_handler(void *data) @@ -222,10 +227,20 @@ int main(int argc, char **argv) { int ret; yaz_sc_t s = yaz_sc_create("pazpar2", "Pazpar2"); + +#ifdef MTRACE + mtrace(); +#endif ret = yaz_sc_program(s, argc, argv, sc_main, sc_stop); yaz_sc_destroy(&s); + +#ifdef MTRACE + muntrace(); +#endif + + exit(ret); } -- 1.7.10.4