From 302b2d5b5d44060a790bcb826f6396135acad13b Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 22 Jul 2016 09:20:02 +0200 Subject: [PATCH] Check if the ScratchPool points to the current Pool and print a warning message in such case --- bacula/src/dird/ua_cmds.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 334066e829..d2e007b320 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -529,6 +529,13 @@ int update_pool_references(JCR *jcr, BDB *db, POOL *pool) { POOL_DBR pr; + if (pool->ScratchPool == pool) { + Jmsg(NULL, M_WARNING, 0, + _("The ScratchPool directive for Pool \"%s\" is incorrect. Using default Scratch pool instead.\n"), + pool->name()); + pool->ScratchPool = NULL; + } + if (!pool->RecyclePool && !pool->ScratchPool) { return 1; } -- 2.39.5