]> git.sur5r.net Git - bacula/bacula/commitdiff
Adapt new prune code with old db_accurate_get_jobids()
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 18 Jun 2010 07:03:28 +0000 (09:03 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 19 Jun 2010 17:07:18 +0000 (19:07 +0200)
bacula/src/dird/ua_prune.c

index 3113057c2ea15011d5e4e051cd0957683071b7d6..f552d161ce1258d3ac0b381b80a76568baafab33 100644 (file)
@@ -405,7 +405,7 @@ int prune_jobs(UAContext *ua, CLIENT *client, POOL *pool, int JobType)
    char ed1[50], ed2[50];
    alist *jobids_check=NULL;
    struct accurate_check_ctx *elt;
-   db_list_ctx jobids;
+   db_list_ctx jobids, tempids;
    JOB_DBR jr;
 
    db_lock(ua->db);
@@ -495,7 +495,8 @@ int prune_jobs(UAContext *ua, CLIENT *client, POOL *pool, int JobType)
    foreach_alist(elt, jobids_check) {
       jr.ClientId = elt->ClientId;
       jr.FileSetId = elt->FileSetId;
-      db_accurate_get_jobids(ua->jcr, ua->db, &jr, &jobids);
+      db_accurate_get_jobids(ua->jcr, ua->db, &jr, &tempids);
+      jobids.cat(tempids);
    }
 
    /* Discard latest Verify level=InitCatalog job */