]> git.sur5r.net Git - bacula/bacula/commitdiff
First attempt to fix plugin excludes
authorKern Sibbald <kern@sibbald.com>
Wed, 7 Apr 2010 20:11:54 +0000 (22:11 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:50:30 +0000 (16:50 +0200)
bacula/src/filed/fd_plugins.c
bacula/src/plugins/fd/test-plugin-fd.c

index 4f5b7a2e12ce2fec7a0161e7e9a35140f62787b3..3141fc6afdfbb561f343b133491e7d900bab2a96 100644 (file)
@@ -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) {
index 2a509278137c161ce670dd5b939d4ccf97e8e64c..d53011b7587800a8bf058663370516e037a7f590 100644 (file)
@@ -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: