]> git.sur5r.net Git - bacula/bacula/commitdiff
Check if the ScratchPool points to the current Pool and print a warning message in...
authorEric Bollengier <eric@baculasystems.com>
Fri, 22 Jul 2016 07:20:02 +0000 (09:20 +0200)
committerKern Sibbald <kern@sibbald.com>
Tue, 20 Sep 2016 15:04:37 +0000 (17:04 +0200)
bacula/src/dird/ua_cmds.c

index 334066e829d0cf50d022262d0f9191312b37543a..d2e007b320126351d1d72a6215b5a15fce33df65 100644 (file)
@@ -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;
    }