From: Eric Bollengier Date: Wed, 24 Nov 2010 10:23:15 +0000 (+0100) Subject: Move accurate test in BackupCommand for delta and delta-test plugins X-Git-Tag: Release-7.0.0~1338 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3127f4f14b19263a2e25579559d325a994cb2d83;p=bacula%2Fbacula Move accurate test in BackupCommand for delta and delta-test plugins --- diff --git a/bacula/src/plugins/fd/delta-test-fd.c b/bacula/src/plugins/fd/delta-test-fd.c index 507f46e3d4..5138e6b515 100644 --- a/bacula/src/plugins/fd/delta-test-fd.c +++ b/bacula/src/plugins/fd/delta-test-fd.c @@ -248,16 +248,6 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) case bEventLevel: // Dmsg(ctx, dbglvl, "delta-test-fd: JobLevel=%c %d\n", (int)value, (int)value); self->level = (int)(intptr_t)value; - if (self->level == 'I' || self->level == 'D') { - bfuncs->getBaculaValue(ctx, bVarAccurate, (void *)&accurate); - if (!accurate) { /* can be changed to FATAL */ - Jmsg(ctx, M_FATAL, - "Accurate mode should be turned on when using the " - "delta-test plugin\n"); - return bRC_Error; - } - } - break; case bEventSince: // Dmsg(ctx, dbglvl, "delta-test-fd: since=%d\n", (int)value); @@ -275,9 +265,18 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) case bEventRestoreCommand: // Dmsg(ctx, dbglvl, "delta-test-fd: EventRestoreCommand cmd=%s\n", (char *)value); /* Fall-through wanted */ + break; case bEventBackupCommand: Dmsg(ctx, dbglvl, "delta-test-fd: pluginEvent cmd=%s\n", (char *)value); - /* TODO: analyse plugin command here */ + if (self->level == 'I' || self->level == 'D') { + bfuncs->getBaculaValue(ctx, bVarAccurate, (void *)&accurate); + if (!accurate) { /* can be changed to FATAL */ + Jmsg(ctx, M_FATAL, + "Accurate mode should be turned on when using the " + "delta-test plugin\n"); + return bRC_Error; + } + } break; default: