From 4b742f46f63d9c9a3ff0b4f1dd6075f426b669e5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 7 Apr 2010 22:11:54 +0200 Subject: [PATCH] First attempt to fix plugin excludes --- bacula/src/filed/fd_plugins.c | 2 +- bacula/src/plugins/fd/test-plugin-fd.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 4f5b7a2e12..3141fc6afd 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -1045,7 +1045,7 @@ static bRC baculaAddExclude(bpContext *ctx, const char *file) { JCR *jcr; bacula_ctx *bctx; - if (ctx) { + if (!ctx) { return bRC_Error; } if (!file) { diff --git a/bacula/src/plugins/fd/test-plugin-fd.c b/bacula/src/plugins/fd/test-plugin-fd.c index 2a50927813..d53011b758 100644 --- a/bacula/src/plugins/fd/test-plugin-fd.c +++ b/bacula/src/plugins/fd/test-plugin-fd.c @@ -219,6 +219,7 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) switch (event->eventType) { case bEventJobStart: bfuncs->DebugMessage(ctx, fi, li, dbglvl, "test-plugin-fd: JobStart=%s\n", (char *)value); + bfuncs->AddExclude(ctx, "/home/kern/bacula/regress/README"); break; case bEventJobEnd: case bEventStartBackupJob: -- 2.39.5