From: Alain Spineux Date: Tue, 3 Aug 2021 08:18:59 +0000 (+0200) Subject: remove dead code mount_request() X-Git-Tag: Release-11.3.2~394 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1560f3149177c1ea9a4e471afe03d388f7360fc2;p=thirdparty%2Fbacula.git remove dead code mount_request() --- diff --git a/bacula/src/dird/Makefile.in b/bacula/src/dird/Makefile.in index 929b1f533..d991de753 100644 --- a/bacula/src/dird/Makefile.in +++ b/bacula/src/dird/Makefile.in @@ -38,7 +38,7 @@ SVRSRCS = dird.c admin.c authenticate.c \ dird_conf.c expand.c \ fd_cmds.c getmsg.c inc_conf.c job.c \ jobq.c mac.c mac_sql.c \ - mountreq.c msgchan.c next_vol.c newvol.c \ + msgchan.c next_vol.c newvol.c \ recycle.c restore.c run_conf.c \ scheduler.c store_mngr.c \ ua_acl.c ua_cmds.c ua_dotcmds.c \ diff --git a/bacula/src/dird/getmsg.c b/bacula/src/dird/getmsg.c index f3514efff..d12b44067 100644 --- a/bacula/src/dird/getmsg.c +++ b/bacula/src/dird/getmsg.c @@ -283,11 +283,6 @@ int bget_dirmsg(BSOCK *bs) } continue; } - if (bs->msg[0] == 'M') { /* Mount request */ - Dmsg1(900, "Mount req: %s", bs->msg); - mount_request(jcr, bs, msg); - continue; - } /* Get Progress: files, bytes, bytes/sec */ if (bs->msg[0] == 'P') { /* Progress report */ uint32_t files, bps; diff --git a/bacula/src/dird/mountreq.c b/bacula/src/dird/mountreq.c deleted file mode 100644 index 76e4fedc5..000000000 --- a/bacula/src/dird/mountreq.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - Bacula(R) - The Network Backup Solution - - Copyright (C) 2000-2020 Kern Sibbald - - The original author of Bacula is Kern Sibbald, with contributions - from many others, a complete list can be found in the file AUTHORS. - - You may use this file and others of this release according to the - license defined in the LICENSE file, which includes the Affero General - Public License, v3.0 ("AGPLv3") and some additional permissions and - terms pursuant to its AGPLv3 Section 7. - - This notice must be preserved when any source code is - conveyed and/or propagated. - - Bacula(R) is a registered trademark of Kern Sibbald. -*/ -/* - * - * Bacula Director -- mountreq.c -- handles the message channel - * Mount request from the Storage daemon. - * - * Kern Sibbald, March MMI - * - * This routine runs as a thread and must be thread reentrant. - * - * Basic tasks done here: - * Handle Mount services. - * - */ - -#include "bacula.h" -#include "dird.h" - -/* - * Handle mount request - * For now, we put the bsock in the UA's queue - */ - -/* Requests from the Storage daemon */ - - -/* Responses sent to Storage daemon */ -#ifdef xxx -static char OK_mount[] = "1000 OK MountVolume\n"; -#endif - -static BQUEUE mountq = {&mountq, &mountq}; -static int num_reqs = 0; -static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - -typedef struct mnt_req_s { - BQUEUE bq; - BSOCK *bs; - JCR *jcr; -} MNT_REQ; - - -void mount_request(JCR *jcr, BSOCK *bs, char *buf) -{ - MNT_REQ *mreq; - - mreq = (MNT_REQ *) malloc(sizeof(MNT_REQ)); - memset(mreq, 0, sizeof(MNT_REQ)); - mreq->jcr = jcr; - mreq->bs = bs; - P(mutex); - num_reqs++; - qinsert(&mountq, &mreq->bq); - V(mutex); - return; -} diff --git a/bacula/src/dird/protos.h b/bacula/src/dird/protos.h index d78859898..b03a83e77 100644 --- a/bacula/src/dird/protos.h +++ b/bacula/src/dird/protos.h @@ -162,9 +162,6 @@ extern bool set_mac_wstorage(UAContext *ua, JCR *jcr, POOL *pool, POOL *next_pool, const char *source); -/* mountreq.c */ -extern void mount_request(JCR *jcr, BSOCK *bs, char *buf); - /* msgchan.c */ extern BSOCK *open_sd_bsock(UAContext *ua); extern void close_sd_bsock(UAContext *ua); diff --git a/bacula/src/win32/dird/Makefile b/bacula/src/win32/dird/Makefile index efcb241e9..20823313a 100644 --- a/bacula/src/win32/dird/Makefile +++ b/bacula/src/win32/dird/Makefile @@ -49,7 +49,6 @@ DIRD_OBJS = \ $(OBJDIR)/inc_conf.o \ $(OBJDIR)/job.o \ $(OBJDIR)/jobq.o \ - $(OBJDIR)/mountreq.o \ $(OBJDIR)/msgchan.o \ $(OBJDIR)/newvol.o \ $(OBJDIR)/next_vol.o \