From: Kern Sibbald Date: Thu, 10 Dec 2009 09:33:51 +0000 (+0100) Subject: Fix and add ASSERT debug X-Git-Tag: Release-5.0.0~156 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=45680b51ba85622440bb594f5f46cc940d985910;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; } /*