]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.c
Minor tweaks to Migration
[bacula/bacula] / bacula / src / dird / dird_conf.c
index c26b1a7fcf707a09a14c5221c3d626e8907ed9c1..8cbf3e3febe04abae04dcd152bc2b6b95e527729 100644 (file)
@@ -1564,6 +1564,8 @@ void store_acl(LEX *lc, RES_ITEM *item, int index, int pass)
    set_bit(index, res_all.hdr.item_present);
 }
 
+/* We build RunScripts items here */
+static RUNSCRIPT res_runscript;
 
 /* Store a runscript->when in a bit field */
 static void store_runscript_when(LEX *lc, RES_ITEM *item, int index, int pass)
@@ -1673,20 +1675,18 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass)
    scan_to_eol(lc);
 }
 
-static RUNSCRIPT  res_runscript;
-
 /*
  * new RunScript items
  *   name             handler         value                                code flags default_value
  */
 static RES_ITEM runscript_items[] = {
-   {"command", store_runscript_cmd,   ITEM(res_runscript),           0,  ITEM_REQUIRED, 0}, 
-   {"target", store_runscript_target, ITEM(res_runscript),            0,  0, 0}, 
-   {"runsonsuccess",    store_bool,   ITEM(res_runscript.on_success), 0,  0, 0},
-   {"runsonfailure",    store_bool,   ITEM(res_runscript.on_failure), 0,  0, 0},
-   {"abortjobonerror", store_bool,    ITEM(res_runscript.abort_on_error), 0, 0,   0},
-   {"runswhen", store_runscript_when, ITEM(res_runscript.when),       0,  0, 0},
-   {"runsonclient", store_runscript_target, ITEM(res_runscript),       0,  0, 0}, /* TODO */
+   {"command", store_runscript_cmd,    {(char **)&res_runscript},           0,  ITEM_REQUIRED, 0}, 
+   {"target", store_runscript_target,  {(char **)&res_runscript},            0,  0, 0}, 
+   {"runsonsuccess",    store_bool,    {(char **)&res_runscript.on_success}, 0,  0, 0},
+   {"runsonfailure",    store_bool,    {(char **)&res_runscript.on_failure}, 0,  0, 0},
+   {"abortjobonerror", store_bool,     {(char **)&res_runscript.abort_on_error}, 0, 0,   0},
+   {"runswhen", store_runscript_when,  {(char **)&res_runscript.when},       0,  0, 0},
+   {"runsonclient", store_runscript_target,  {(char **)&res_runscript},       0,  0, 0}, /* TODO */
    {NULL, NULL, {0}, 0, 0, 0}
 };