]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.c
Fix bug #1268 Full Max Run Time cancels jobs (when Max Run Time = 0).
[bacula/bacula] / bacula / src / dird / dird_conf.c
index 7b246591538db93d0cf074bd980078d41e0dba22..3087c440d5fc78220fb320d2c7b717bd5cd2279c 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -114,11 +114,12 @@ static RES_ITEM dir_items[] = {
    {"diraddresses",store_addresses,         ITEM(res_dir.DIRaddrs),  0, ITEM_DEFAULT, 9101},
    {"queryfile",   store_dir,      ITEM(res_dir.query_file), 0, ITEM_REQUIRED, 0},
    {"workingdirectory", store_dir, ITEM(res_dir.working_directory), 0, ITEM_REQUIRED, 0},
-   {"plugindirectory",  store_dir, ITEM(res_dir.plugin_directory), 0, 0, 0},
+   {"plugindirectory",  store_dir, ITEM(res_dir.plugin_directory),  0, 0, 0},
    {"scriptsdirectory", store_dir, ITEM(res_dir.scripts_directory), 0, 0, 0},
-   {"piddirectory",store_dir,     ITEM(res_dir.pid_directory), 0, ITEM_REQUIRED, 0},
-   {"subsysdirectory", store_dir,  ITEM(res_dir.subsys_directory), 0, 0, 0},
+   {"piddirectory",     store_dir, ITEM(res_dir.pid_directory),     0, ITEM_REQUIRED, 0},
+   {"subsysdirectory",  store_dir, ITEM(res_dir.subsys_directory),  0, 0, 0},
    {"maximumconcurrentjobs", store_pint32, ITEM(res_dir.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+   {"maximumconsoleconnections", store_pint32, ITEM(res_dir.MaxConsoleConnect), 0, ITEM_DEFAULT, 20},
    {"password",    store_password, ITEM(res_dir.password), 0, ITEM_REQUIRED, 0},
    {"fdconnecttimeout", store_time,ITEM(res_dir.FDConnectTimeout), 0, ITEM_DEFAULT, 3 * 60},
    {"sdconnecttimeout", store_time,ITEM(res_dir.SDConnectTimeout), 0, ITEM_DEFAULT, 30 * 60},
@@ -134,6 +135,7 @@ static RES_ITEM dir_items[] = {
    {"tlsdhfile",            store_dir,       ITEM(res_dir.tls_dhfile), 0, 0, 0},
    {"tlsallowedcn",         store_alist_str, ITEM(res_dir.tls_allowed_cns), 0, 0, 0},
    {"statisticsretention",  store_time,      ITEM(res_dir.stats_retention),  0, ITEM_DEFAULT, 60*60*24*31*12*5},
+   {"verid",                store_str,       ITEM(res_dir.verid), 0, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
 };
 
@@ -395,6 +397,7 @@ static RES_ITEM pool_items[] = {
    {"autoprune",     store_bool,      ITEM(res_pool.AutoPrune), 0, ITEM_DEFAULT, true},
    {"recycle",       store_bool,      ITEM(res_pool.Recycle),   0, ITEM_DEFAULT, true},
    {"recyclepool",   store_res,       ITEM(res_pool.RecyclePool), R_POOL, 0, 0},
+   {"scratchpool",   store_res,       ITEM(res_pool.ScratchPool), R_POOL, 0, 0},
    {"copypool",      store_alist_res, ITEM(res_pool.CopyPool), R_POOL, 0, 0},
    {"catalog",       store_res,       ITEM(res_pool.catalog), R_CATALOG, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
@@ -490,7 +493,7 @@ struct s_jt migtypes[] = {
    {"oldestvolume",     MT_OLDEST_VOL},
    {"pooloccupancy",    MT_POOL_OCCUPANCY},
    {"pooltime",         MT_POOL_TIME},
-   {"pooluncopiedjobs",        MT_POOL_UNCOPIED_JOBS},
+   {"pooluncopiedjobs", MT_POOL_UNCOPIED_JOBS},
    {"client",           MT_CLIENT},
    {"volume",           MT_VOLUME},
    {"job",              MT_JOB},
@@ -949,6 +952,9 @@ next_run:
       if (res->res_pool.RecyclePool) {
          sendit(sock, _("      RecyclePool=%s\n"), res->res_pool.RecyclePool->name());
       }
+      if (res->res_pool.ScratchPool) {
+         sendit(sock, _("      ScratchPool=%s\n"), res->res_pool.ScratchPool->name());
+      }
       if (res->res_pool.catalog) {
          sendit(sock, _("      Catalog=%s\n"), res->res_pool.catalog->name());
       }
@@ -1094,6 +1100,9 @@ void free_resource(RES *sres, int type)
       if (res->res_dir.tls_allowed_cns) {
          delete res->res_dir.tls_allowed_cns;
       }
+      if (res->res_dir.verid) {
+         free(res->res_dir.verid);
+      }
       break;
    case R_DEVICE:
    case R_COUNTER:
@@ -1380,6 +1389,7 @@ void save_resource(int type, RES_ITEM *items, int pass)
          /* Explicitly copy resource pointers from this pass (res_all) */
          res->res_pool.NextPool = res_all.res_pool.NextPool;
          res->res_pool.RecyclePool = res_all.res_pool.RecyclePool;
+         res->res_pool.ScratchPool = res_all.res_pool.ScratchPool;
          res->res_pool.storage    = res_all.res_pool.storage;
          res->res_pool.catalog    = res_all.res_pool.catalog;
          break;
@@ -1968,7 +1978,7 @@ static void store_runscript(LEX *lc, RES_ITEM *item, int index, int pass)
        */
       res_runscript.set_job_code_callback(job_code_callback_filesetname);
       while ((c=(char*)res_runscript.commands->pop()) != NULL) {
-         t = (long)res_runscript.commands->pop();
+         t = (intptr_t)res_runscript.commands->pop();
          RUNSCRIPT *script = new_runscript();
          memcpy(script, &res_runscript, sizeof(RUNSCRIPT));
          script->command = c;