]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
docker: Fix variable scope reduced.
authorRadosław Korzeniewski <radoslaw@korzeniewski.net>
Tue, 17 Nov 2020 14:11:55 +0000 (15:11 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/src/plugins/fd/docker/docker-fd.c

index ee94fc157019e2f35ad06421a1a7398a079df61a..911b020bb7f0301fe4c82e3b015e16c39bc4b943 100644 (file)
@@ -165,6 +165,7 @@ DOCKER::DOCKER(bpContext *bpctx) :
       robjbuf(NULL),
       currdkinfo(NULL),
       restoredkinfo(NULL),
+      currvols(NULL),
       listing_mode(DOCKER_LISTING_NONE),
       listing_objnr(0),
       parser(NULL),
@@ -739,7 +740,6 @@ bRC DOCKER::perform_backup_open(bpContext *ctx, struct io_pkt *io)
 {
    POOL_MEM wname(PM_FNAME);
    struct stat statp;
-   btimer_t *timer;
 
    DMSG1(ctx, DDEBUG, "perform_backup_open called: %s\n", io->fname);
    /* prepare backup for DOCKER_VOLUME */
@@ -755,7 +755,7 @@ bRC DOCKER::perform_backup_open(bpContext *ctx, struct io_pkt *io)
          /* if the path does not exist then create one */
          if (be.code() != ENOENT || mkfifo(wname.c_str(), 0600) != 0){
             /* error creating named pipe */
-            berrno be;
+            be.set_errno(errno);
             io->status = -1;
             io->io_errno = be.code();
             dkcommctx->set_error();
@@ -789,7 +789,7 @@ bRC DOCKER::perform_backup_open(bpContext *ctx, struct io_pkt *io)
 
    /* finish preparation for DOCKER_VOLUME */
    if (currdkinfo->type() == DOCKER_VOLUME){
-      timer = start_thread_timer(NULL, pthread_self(), dkcommctx->timeout());
+      btimer_t *timer = start_thread_timer(NULL, pthread_self(), dkcommctx->timeout());
       dkfd = open(wname.c_str(), O_RDONLY);
       stop_thread_timer(timer);
       if (dkfd < 0){