From 45680b51ba85622440bb594f5f46cc940d985910 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 10 Dec 2009 10:33:51 +0100 Subject: [PATCH] Fix and add ASSERT debug --- bacula/src/baconfig.h | 1 + bacula/src/lib/lockmgr.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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; } /* -- 2.39.5