From: Radosław Korzeniewski Date: Tue, 17 Nov 2020 14:11:55 +0000 (+0100) Subject: docker: Fix variable scope reduced. X-Git-Tag: Release-11.3.2~753 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a32050a6acdb039089fa771e41d3e06deae1f0;p=thirdparty%2Fbacula.git docker: Fix variable scope reduced. --- diff --git a/bacula/src/plugins/fd/docker/docker-fd.c b/bacula/src/plugins/fd/docker/docker-fd.c index ee94fc157..911b020bb 100644 --- a/bacula/src/plugins/fd/docker/docker-fd.c +++ b/bacula/src/plugins/fd/docker/docker-fd.c @@ -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){