*/
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);
}
}