]> git.sur5r.net Git - bacula/bacula/commitdiff
Rename MaximumBandwidth to MaximumBandwidthPerJob for Client directives
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 29 Nov 2010 16:45:22 +0000 (17:45 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 1 Dec 2010 09:10:34 +0000 (10:10 +0100)
bacula/src/filed/filed_conf.c
bacula/src/filed/filed_conf.h
bacula/src/filed/job.c
bacula/src/filed/status.c

index 4986f147334f44514b4397f3fba1fa64145ba8df..9c31ffb5e57bfa97a617eefa0ab82f72278f4d4d 100644 (file)
@@ -118,7 +118,7 @@ static RES_ITEM cli_items[] = {
    {"tlscertificate",        store_dir,       ITEM(res_client.tls_certfile), 0, 0, 0},
    {"tlskey",                store_dir,       ITEM(res_client.tls_keyfile), 0, 0, 0},
    {"verid",                 store_str,       ITEM(res_client.verid), 0, 0, 0},
-   {"maximumbandwidth",      store_speed,     ITEM(res_client.max_bandwidth), 0, 0, 0},
+   {"maximumbandwidthperjob",      store_speed,     ITEM(res_client.max_bandwidth_per_job), 0, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
 };
 
@@ -139,7 +139,7 @@ static RES_ITEM dir_items[] = {
    {"tlskey",               store_dir,       ITEM(res_dir.tls_keyfile), 0, 0, 0},
    {"tlsdhfile",            store_dir,       ITEM(res_dir.tls_dhfile), 0, 0, 0},
    {"tlsallowedcn",         store_alist_str, ITEM(res_dir.tls_allowed_cns), 0, 0, 0},
-   {"maximumbandwidth",     store_speed,     ITEM(res_dir.max_bandwidth), 0, 0, 0},
+   {"maximumbandwidthperjob", store_speed,     ITEM(res_dir.max_bandwidth_per_job), 0, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
 };
 
index 2200691f9bbc54d0865547b0509bf19ba2b04c8b..53244ed7b60a870ca05ddb0468a46645ff62fd02 100644 (file)
@@ -69,7 +69,7 @@ struct DIRRES {
    char *tls_keyfile;                 /* TLS Server Key File */
    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
    alist *tls_allowed_cns;            /* TLS Allowed Clients */
-   uint64_t max_bandwidth;            /* Bandwidth limitation (per director) */
+   uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (per director) */
    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
 };
 
@@ -105,7 +105,7 @@ struct CLIENT {
    alist *pki_recipients;             /* Shared PKI Recipients */
    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
    char *verid;                       /* Custom Id to print in version command */
-   uint64_t max_bandwidth;            /* Bandwidth limitation (global) */
+   uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (global) */
 };
 
 
index c42753c482ad7dfb8e67e37f061c6afaf1c7253f..31c2ccd4c433049114fb7f3a58760f30310312c5 100644 (file)
@@ -502,8 +502,8 @@ static int setbandwidth_cmd(JCR *jcr)
          free_jcr(cjcr);
       }
 
-   } else {                     /* No job requested, apply globally */
-      me->max_bandwidth = bw;   /* Overwrite directive */
+   } else {                           /* No job requested, apply globally */
+      me->max_bandwidth_per_job = bw; /* Overwrite directive */
    }
 
    return dir->fsend(OKBandwidth);
@@ -1736,11 +1736,11 @@ static int storage_cmd(JCR *jcr)
 
    /* TODO: see if we put limit on restore and backup... */
    if (!jcr->max_bandwidth) {
-      if (jcr->director->max_bandwidth) {
-         jcr->max_bandwidth = jcr->director->max_bandwidth;
+      if (jcr->director->max_bandwidth_per_job) {
+         jcr->max_bandwidth = jcr->director->max_bandwidth_per_job;
          
-      } else if (me->max_bandwidth) {
-         jcr->max_bandwidth = me->max_bandwidth;
+      } else if (me->max_bandwidth_per_job) {
+         jcr->max_bandwidth = me->max_bandwidth_per_job;
       }
    }
    sd->set_bwlimit(jcr->max_bandwidth);
index ed4f04d6d06c97e115471471413cb1b6008c5a83..31dad70cff9e5384cf9d1bde84e524dd20454b82 100644 (file)
@@ -140,7 +140,7 @@ static void  list_status_header(STATUS_PKT *sp)
    sendit(msg.c_str(), len, sp);
    len = Mmsg(msg, _(" Sizeof: boffset_t=%d size_t=%d debug=%d trace=%d "
                      "bwlimit=%lldkb/s\n"), sizeof(boffset_t), sizeof(size_t),
-              debug_level, get_trace(), me->max_bandwidth/1024);
+              debug_level, get_trace(), me->max_bandwidth_per_job/1024);
    sendit(msg.c_str(), len, sp);
    if (debug_level > 0 && plugin_list->size() > 0) {
       Plugin *plugin;