From: James Harper Date: Sun, 18 Apr 2010 06:36:48 +0000 (+0200) Subject: Add bVarWorkingDir to filed plugins X-Git-Tag: Release-5.2.1~1458 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b88e28c05a799a8900d33fe73cda7e89441d006;p=bacula%2Fbacula Add bVarWorkingDir to filed plugins --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 4d7abba263..65ec96b67a 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -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; } diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index adf82df4c5..cbfe199e80 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -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 */