]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix compilation
authorEric Bollengier <eric@baculasystems.com>
Tue, 1 Jun 2021 12:19:18 +0000 (14:19 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Jun 2021 12:47:35 +0000 (14:47 +0200)
bacula/src/cats/sql_get.c

index 863a45229f13642d387ce571dc56778c126de6ae..a080df9cbeedc5d2c84a346227053a2f82c87064 100644 (file)
@@ -1461,7 +1461,7 @@ bool BDB::bdb_get_accurate_jobids(JCR *jcr,
    char clientid[50], jobid[50], filesetid[50];
    char date[MAX_TIME_LENGTH];
    char esc[MAX_ESCAPE_NAME_LENGTH];
-   POOL_MEM query(PM_MESSAGE), name(PM_FNAME), aux(PM_FNAME);
+   POOL_MEM query(PM_MESSAGE), name(PM_FNAME);
 
    /* Take the current time as upper limit if nothing else specified */
    utime_t StartTime = (jr->StartTime)?jr->StartTime:time(NULL);
@@ -1481,13 +1481,12 @@ bool BDB::bdb_get_accurate_jobids(JCR *jcr,
        * depdending on the Job level of the hint, we must
        * adapt one of the queries (F, D, I) and add a JobId=x
        */
-      edit_uint64(from_jobid, jobid);
+      edit_uint64(jcr->JobId, jobid);
    }
 
    if (jr->Name[0] != 0) {
       bdb_escape_string(jcr, esc, jr->Name, strlen(jr->Name));
       Mmsg(name, " AND Name = '%s' ", esc);
-      aux.strcat(name.c_str());
    }
 
    /* First, find the last good Full backup for this job/client/fileset */
@@ -1496,7 +1495,7 @@ bool BDB::bdb_get_accurate_jobids(JCR *jcr,
         edit_uint64(jr->ClientId, clientid),
         date,
         edit_uint64(jr->FileSetId, filesetid),
-        aux.c_str()
+        name.c_str()
       );
 
    if (!bdb_sql_query(query.c_str(), NULL, NULL)) {