]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird.c
Apply Eric's next-beta.patch that enables 64 bit FileIds and
[bacula/bacula] / bacula / src / dird / dird.c
index 19efc1b761d25dfad097c59c076cd7a576babebb..edf4a650be912507c93a99294722cfba2b63fa5b 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-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.
@@ -385,6 +385,7 @@ void terminate_dird(int sig)
    term_msg();                        /* terminate message handler */
    cleanup_crypto();
    close_memory_pool();               /* release free memory in pool */
+   lmgr_cleanup_main();
    sm_dump(false);
    exit(sig);
 }
@@ -944,7 +945,19 @@ static bool check_catalog()
           */
          if (!pool->catalog || pool->catalog == catalog) {
             create_pool(NULL, db, pool, POOL_OP_UPDATE);  /* update request */
-            update_pool_recyclepool(NULL, db, pool);
+         }
+      }
+
+      /* Once they are created, we can loop over them again, updating
+       * references (RecyclePool)
+       */
+      foreach_res(pool, R_POOL) {
+         /*
+          * If the Pool has a catalog resource update the pool only
+          *   in that catalog.
+          */
+         if (!pool->catalog || pool->catalog == catalog) {
+            update_pool_references(NULL, db, pool);
          }
       }