From db6855eaea8c0b0a20b248df565d947f43983c01 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 7 Dec 2009 09:22:08 +0100 Subject: [PATCH] Add memory corruption checks --- bacula/src/stored/askdir.c | 2 ++ bacula/src/stored/dircmd.c | 4 +++- bacula/src/stored/fd_cmds.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 6bbc127937..3bf2d9cee9 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -380,6 +380,8 @@ bool dir_update_volume_info(DCR *dcr, bool label, bool update_LastWritten) ok = true; bail_out: + /* ***FIXME*** remove for production */ + sm_check(__FILE__, __LINE__, true); V(vol_info_mutex); return ok; } diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 8ce44e5beb..7626fbb4be 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2008 Free Software Foundation Europe e.V. + Copyright (C) 2001-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -250,6 +250,8 @@ bail_out: dequeue_messages(jcr); /* send any queued messages */ bs->signal(BNET_TERMINATE); free_jcr(jcr); + /* ***FIXME*** remove for production */ + sm_check(__FILE__, __LINE__, true); return NULL; } diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index 992d705e4d..49616e4d09 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -129,6 +129,8 @@ void run_job(JCR *jcr) dir->fsend(Job_end, jcr->Job, jcr->JobStatus, jcr->JobFiles, edit_uint64(jcr->JobBytes, ec1), jcr->JobErrors); dir->signal(BNET_EOD); /* send EOD to Director daemon */ + /* ***FIXME*** remove for production */ + sm_check(__FILE__, __LINE__, true); return; } -- 2.39.5