From 5e1eed030d9eb232f5d08189fb011a39510ce0dd Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 6 Apr 2010 22:32:52 +0200 Subject: [PATCH] Tweak fd_plugins.c --- bacula/src/filed/fd_plugins.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index ad782004fe..6ea3005a6b 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -126,7 +126,7 @@ void generate_plugin_event(JCR *jcr, bEventType eventType, void *value) Plugin *plugin; int i = 0; - if (!plugin_list || !jcr || !jcr->plugin_ctx_list || job_canceled(jcr)) { + if (!plugin_list || !jcr || !jcr->plugin_ctx_list || jcr->is_job_canceled()) { return; /* Return if no plugins loaded */ } @@ -163,7 +163,7 @@ bool plugin_check_file(JCR *jcr, char *fname) int rc = bRC_OK; int i = 0; - if (!plugin_list || !jcr || !jcr->plugin_ctx_list || job_canceled(jcr)) { + if (!plugin_list || !jcr || !jcr->plugin_ctx_list || jcr->is_job_canceled()) { return false; /* Return if no plugins loaded */ } @@ -220,7 +220,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) POOL_MEM fname(PM_FNAME); POOL_MEM link(PM_FNAME); - if (!plugin_list || !jcr->plugin_ctx_list || job_canceled(jcr)) { + if (!plugin_list || !jcr->plugin_ctx_list || jcr->is_job_canceled()) { Jmsg1(jcr, M_FATAL, 0, "Command plugin \"%s\" not loaded.\n", cmd); return 1; /* Return if no plugins loaded */ } @@ -264,7 +264,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) goto bail_out; } /* Loop getting filenames to backup then saving them */ - while (!job_canceled(jcr)) { + while (!jcr->is_job_canceled()) { memset(&sp, 0, sizeof(sp)); sp.pkt_size = sizeof(sp); sp.pkt_end = sizeof(sp); @@ -272,7 +272,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) sp.cmd = cmd; Dmsg3(dbglvl, "startBackup st_size=%p st_blocks=%p sp=%p\n", &sp.statp.st_size, &sp.statp.st_blocks, &sp); - /* Get the file save parameters */ + /* Get the file save parameters. I.e. the stat pkt ... */ if (plug_func(plugin)->startBackupFile(jcr->plugin_ctx, &sp) != bRC_OK) { goto bail_out; } @@ -328,7 +328,7 @@ bool send_plugin_name(JCR *jcr, BSOCK *sd, bool start) Jmsg0(jcr, M_FATAL, 0, _("Plugin save packet not found.\n")); return false; } - if (job_canceled(jcr)) { + if (jcr->is_job_canceled()) { return false; } @@ -470,7 +470,7 @@ int plugin_create_file(JCR *jcr, ATTR *attr, BFILE *bfd, int replace) int flags; int rc; - if (!plugin || !plugin_ctx || !set_cmd_plugin(bfd, jcr) || job_canceled(jcr)) { + if (!plugin || !plugin_ctx || !set_cmd_plugin(bfd, jcr) || jcr->is_job_canceled()) { return CF_ERROR; } rp.pkt_size = sizeof(rp); @@ -656,7 +656,7 @@ void new_plugins(JCR *jcr) Dmsg0(dbglvl, "plugin list is NULL\n"); return; } - if (job_canceled(jcr)) { + if (jcr->is_job_canceled()) { return; } -- 2.39.5