From: Kern Sibbald Date: Thu, 10 Dec 2009 09:33:51 +0000 (+0100) Subject: Fix and add ASSERT debug X-Git-Tag: Release-7.0.0~2473 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66197a57fd0f5f6386910db35dffa34954b18312;p=bacula%2Fbacula Fix and add ASSERT debug --- diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 9ccd01f286..657830a09c 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -65,6 +65,7 @@ #define ASSERT(x) if (!(x)) { \ char *jcr = NULL; \ Emsg1(M_ERROR, 0, _("Failed ASSERT: %s\n"), #x); \ + Pmsg1(000, _("Failed ASSERT: %s\n"), #x); \ jcr[0] = 0; } #else #define ASSERT(x) diff --git a/bacula/src/lib/lockmgr.c b/bacula/src/lib/lockmgr.c index 11d83fa293..19db323fcd 100644 --- a/bacula/src/lib/lockmgr.c +++ b/bacula/src/lib/lockmgr.c @@ -59,12 +59,12 @@ #undef ASSERT #define ASSERT(x) if (!(x)) { \ char *jcr = NULL; \ - Pmsg3(000, _("Failed ASSERT: %s\n"), __FILE__, __LINE__, #x); \ + Pmsg3(000, _("ASSERT failed at %s:%i: %s\n"), __FILE__, __LINE__, #x); \ jcr[0] = 0; } #define ASSERT_p(x,f,l) if (!(x)) { \ char *jcr = NULL; \ - Pmsg3(000, _("from %s:%i Failed ASSERT: %s\n"), f, l, #x); \ + Pmsg3(000, _("ASSERT failed at %s:%i: %s \n"), f, l, #x); \ jcr[0] = 0; } /*