From: Kern Sibbald Date: Wed, 7 Apr 2010 20:11:54 +0000 (+0200) Subject: First attempt to fix plugin excludes X-Git-Tag: Release-5.2.1~1504 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b742f46f63d9c9a3ff0b4f1dd6075f426b669e5;p=bacula%2Fbacula First attempt to fix plugin excludes --- 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: