From: Dennis Schafroth Date: Mon, 28 Mar 2011 08:57:39 +0000 (+0200) Subject: Add mtrace start/stop. Requires MTRACE define X-Git-Tag: v1.5.5~5 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=bf81b551fa94e438b97bc4c7d1613ec2923a6b48;p=pazpar2-moved-to-github.git Add mtrace start/stop. Requires MTRACE define --- 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); }