]> git.sur5r.net Git - bacula/bacula/commitdiff
Add bVarWorkingDir to filed plugins
authorJames Harper <james.harper@bendigoit.com.au>
Sun, 18 Apr 2010 06:36:48 +0000 (08:36 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:53:12 +0000 (16:53 +0200)
bacula/src/filed/fd_plugins.c
bacula/src/filed/fd_plugins.h

index 4d7abba2633867a7e274bb1ff02ebd4ca074c8a0..65ec96b67ad80fd80bbbee43e2397b4d25d793ca 100644 (file)
@@ -34,6 +34,8 @@
 #include "bacula.h"
 #include "filed.h"
 
+extern CLIENT *me;
+
 const int dbglvl = 150;
 #ifdef HAVE_WIN32
 const char *plugin_type = "-fd.dll";
@@ -954,6 +956,9 @@ static bRC baculaGetValue(bpContext *ctx, bVariable var, void *value)
        }
 #endif
        return bRC_Error;
+   case bVarWorkingDir:
+      *(void **)value = me->working_directory;
+      break;
    }
    return bRC_OK;
 }
index adf82df4c50f68f17306ce368f581c886ccacce0..cbfe199e8019c33c35e21942ca46620f24a17c5e 100644 (file)
@@ -172,7 +172,8 @@ typedef enum {
   bVarAccurate  = 9,
   bVarFileSeen  = 10,
   bVarVssObject = 11,
-  bVarVssDllHandle = 12
+  bVarVssDllHandle = 12,
+  bVarWorkingDir = 13
 } bVariable;
 
 /* Events that are passed to plugin */