]> git.sur5r.net Git - bacula/bacula/commitdiff
More work on word alignments -- eliminate all ints from
authorKern Sibbald <kern@sibbald.com>
Wed, 18 Jun 2008 19:22:03 +0000 (19:22 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 18 Jun 2008 19:22:03 +0000 (19:22 +0000)
     the configuration routines.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7164 91ce42f0-d328-0410-95d8-f526ca767f89

21 files changed:
bacula/src/console/console_conf.c
bacula/src/console/console_conf.h
bacula/src/dird/dird.c
bacula/src/dird/dird_conf.c
bacula/src/dird/dird_conf.h
bacula/src/filed/filed_conf.c
bacula/src/filed/filed_conf.h
bacula/src/gnome2-console/console_conf.c
bacula/src/gnome2-console/console_conf.h
bacula/src/jcr.h
bacula/src/lib/parse_conf.c
bacula/src/lib/parse_conf.h
bacula/src/qt-console/bat_conf.cpp
bacula/src/qt-console/bat_conf.h
bacula/src/stored/stored_conf.c
bacula/src/stored/stored_conf.h
bacula/src/tray-monitor/tray_conf.c
bacula/src/tray-monitor/tray_conf.h
bacula/src/wx-console/console_conf.c
bacula/src/wx-console/console_conf.h
bacula/technotes-2.3

index b6a42ceac07756e3a11ee2b2a2333dd3f566705b..d2d14bf52610b0776b7b2e73a9e1ba829ff499f3 100644 (file)
@@ -104,7 +104,7 @@ static RES_ITEM cons_items[] = {
 static RES_ITEM dir_items[] = {
    {"name",           store_name,      ITEM(res_dir.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description",    store_str,       ITEM(res_dir.hdr.desc), 0, 0, 0},
-   {"dirport",        store_int,       ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
+   {"dirport",        store_pint32,    ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
    {"address",        store_str,       ITEM(res_dir.address),  0, 0, 0},
    {"password",       store_password,  ITEM(res_dir.password), 0, ITEM_REQUIRED, 0},
    {"tlsenable",      store_bool,      ITEM(res_dir.tls_enable), 1, 0, 0},
index 2eb8eb95b26d0516095e6cc1ef2156c5ab36a464..ab51b80f5f61bfb2f0a17a09b8b27f2575ca53d7 100644 (file)
@@ -78,7 +78,7 @@ struct CONRES {
 /* Director */
 struct DIRRES {
    RES   hdr;
-   int   DIRport;                     /* UA server port */
+   uint32_t DIRport;                  /* UA server port */
    char *address;                     /* UA server address */
    char *password;                    /* UA server password */
    char *tls_ca_certfile;             /* TLS CA Certificate File */
index 4b25176e9336d67fa91fcef0b223aff62b2d5a71..760c1e5c8d3acf30716373c8a217c00563fe1308 100644 (file)
@@ -642,7 +642,7 @@ static bool check_resources()
          /* Transfer default items from JobDefs Resource */
          for (i=0; job_items[i].name; i++) {
             char **def_svalue, **svalue;  /* string value */
-            int *def_ivalue, *ivalue;     /* integer value */
+            uint32_t *def_ivalue, *ivalue;     /* integer value */
             bool *def_bvalue, *bvalue;    /* bool value */
             int64_t *def_lvalue, *lvalue; /* 64 bit values */
             uint32_t offset;
@@ -692,20 +692,20 @@ static bool check_resources()
                      set_bit(i, job->hdr.item_present);
                   }
                /*
-                * Handle integer fields
+                * Handle 32 bit integer fields
                 *    Note, our store_bit does not handle bitmaped fields
                 */
                } else if (job_items[i].handler == store_bit     ||
-                          job_items[i].handler == store_pint    ||
+                          job_items[i].handler == store_pint32  ||
                           job_items[i].handler == store_jobtype ||
                           job_items[i].handler == store_level   ||
-                          job_items[i].handler == store_pint    ||
+                          job_items[i].handler == store_int32   ||
                           job_items[i].handler == store_migtype ||
                           job_items[i].handler == store_replace) {
-                  def_ivalue = (int *)((char *)(job->jobdefs) + offset);
+                  def_ivalue = (uint32_t *)((char *)(job->jobdefs) + offset);
                   Dmsg5(400, "Job \"%s\", field \"%s\" def_ivalue=%d item %d offset=%u\n",
                        job->name(), job_items[i].name, *def_ivalue, i, offset);
-                  ivalue = (int *)((char *)job + offset);
+                  ivalue = (uint32_t *)((char *)job + offset);
                   *ivalue = *def_ivalue;
                   set_bit(i, job->hdr.item_present);
                /*
index 77c74c73c06256328a76bf42737bc1424f3e1974..25ee74e18080dec583043d237d74f9c0449d7f5f 100644 (file)
@@ -117,7 +117,7 @@ static RES_ITEM dir_items[] = {
    {"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},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_dir.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+   {"maximumconcurrentjobs", store_pint32, ITEM(res_dir.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
    {"password",    store_password, ITEM(res_dir.password), 0, ITEM_REQUIRED, 0},
    {"fdconnecttimeout", store_time,ITEM(res_dir.FDConnectTimeout), 0, ITEM_DEFAULT, 60 * 30},
    {"sdconnecttimeout", store_time,ITEM(res_dir.SDConnectTimeout), 0, ITEM_DEFAULT, 60 * 30},
@@ -177,7 +177,7 @@ static RES_ITEM cli_items[] = {
    {"description", store_str,     ITEM(res_client.hdr.desc), 0, 0, 0},
    {"address",  store_str,        ITEM(res_client.address),  0, ITEM_REQUIRED, 0},
    {"fdaddress",  store_str,      ITEM(res_client.address),  0, 0, 0},
-   {"fdport",   store_pint,       ITEM(res_client.FDport),   0, ITEM_DEFAULT, 9102},
+   {"fdport",   store_pint32,     ITEM(res_client.FDport),   0, ITEM_DEFAULT, 9102},
    {"password", store_password,   ITEM(res_client.password), 0, ITEM_REQUIRED, 0},
    {"fdpassword", store_password,   ITEM(res_client.password), 0, 0, 0},
    {"catalog",  store_res,        ITEM(res_client.catalog),  R_CATALOG, ITEM_REQUIRED, 0},
@@ -185,7 +185,7 @@ static RES_ITEM cli_items[] = {
    {"jobretention",  store_time,  ITEM(res_client.JobRetention),  0, ITEM_DEFAULT, 60*60*24*180},
    {"heartbeatinterval", store_time, ITEM(res_client.heartbeat_interval), 0, ITEM_DEFAULT, 0},
    {"autoprune", store_bool,      ITEM(res_client.AutoPrune), 0, ITEM_DEFAULT, true},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+   {"maximumconcurrentjobs", store_pint32, ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
    {"tlsenable",            store_bool,      ITEM(res_client.tls_enable), 0, 0, 0},
    {"tlsrequire",           store_bool,      ITEM(res_client.tls_require), 0, 0, 0},
    {"tlscacertificatefile", store_dir,       ITEM(res_client.tls_ca_certfile), 0, 0, 0},
@@ -203,7 +203,7 @@ static RES_ITEM cli_items[] = {
 static RES_ITEM store_items[] = {
    {"name",        store_name,     ITEM(res_store.hdr.name),   0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(res_store.hdr.desc),   0, 0, 0},
-   {"sdport",      store_pint,     ITEM(res_store.SDport),     0, ITEM_DEFAULT, 9103},
+   {"sdport",      store_pint32,   ITEM(res_store.SDport),     0, ITEM_DEFAULT, 9103},
    {"address",     store_str,      ITEM(res_store.address),    0, ITEM_REQUIRED, 0},
    {"sdaddress",   store_str,      ITEM(res_store.address),    0, 0, 0},
    {"password",    store_password, ITEM(res_store.password),   0, ITEM_REQUIRED, 0},
@@ -213,8 +213,8 @@ static RES_ITEM store_items[] = {
    {"autochanger", store_bool,     ITEM(res_store.autochanger), 0, ITEM_DEFAULT, 0},
    {"enabled",     store_bool,     ITEM(res_store.enabled),     0, ITEM_DEFAULT, true},
    {"heartbeatinterval", store_time, ITEM(res_store.heartbeat_interval), 0, ITEM_DEFAULT, 0},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_store.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
-   {"sddport", store_pint, ITEM(res_store.SDDport), 0, 0, 0}, /* deprecated */
+   {"maximumconcurrentjobs", store_pint32, ITEM(res_store.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+   {"sddport", store_pint32, ITEM(res_store.SDDport), 0, 0, 0}, /* deprecated */
    {"tlsenable",            store_bool,      ITEM(res_store.tls_enable), 0, 0, 0},
    {"tlsrequire",           store_bool,      ITEM(res_store.tls_require), 0, 0, 0},
    {"tlscacertificatefile", store_dir,       ITEM(res_store.tls_ca_certfile), 0, 0, 0},
@@ -234,7 +234,7 @@ static RES_ITEM cat_items[] = {
    {"description", store_str,   ITEM(res_cat.hdr.desc),    0, 0, 0},
    {"address",  store_str,      ITEM(res_cat.db_address),  0, 0, 0},
    {"dbaddress", store_str,     ITEM(res_cat.db_address),  0, 0, 0},
-   {"dbport",   store_pint,     ITEM(res_cat.db_port),      0, 0, 0},
+   {"dbport",   store_pint32,     ITEM(res_cat.db_port),      0, 0, 0},
    /* keep this password as store_str for the moment */
    {"password", store_str,      ITEM(res_cat.db_password), 0, 0, 0},
    {"dbpassword", store_str,    ITEM(res_cat.db_password), 0, 0, 0},
@@ -302,11 +302,11 @@ RES_ITEM job_items[] = {
    {"runafterfailedjob",  store_short_runscript,  ITEM(res_job.RunScripts),  0, 0, 0},
    {"clientrunbeforejob", store_short_runscript,  ITEM(res_job.RunScripts),  0, 0, 0},
    {"clientrunafterjob",  store_short_runscript,  ITEM(res_job.RunScripts),  0, 0, 0},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_job.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+   {"maximumconcurrentjobs", store_pint32, ITEM(res_job.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
    {"rescheduleonerror", store_bool, ITEM(res_job.RescheduleOnError), 0, ITEM_DEFAULT, false},
    {"rescheduleinterval", store_time, ITEM(res_job.RescheduleInterval), 0, ITEM_DEFAULT, 60 * 30},
-   {"rescheduletimes", store_pint, ITEM(res_job.RescheduleTimes), 0, 0, 0},
-   {"priority",   store_pint, ITEM(res_job.Priority), 0, ITEM_DEFAULT, 10},
+   {"rescheduletimes", store_pint32, ITEM(res_job.RescheduleTimes), 0, 0, 0},
+   {"priority",   store_pint32, ITEM(res_job.Priority), 0, ITEM_DEFAULT, 10},
    {"writepartafterjob",   store_bool, ITEM(res_job.write_part_after_job), 0, ITEM_DEFAULT, true},
    {"selectionpattern", store_str, ITEM(res_job.selection_pattern), 0, 0, 0},
    {"runscript", store_runscript, ITEM(res_job.RunScripts), 0, ITEM_NO_EQUALS, 0},
@@ -356,9 +356,9 @@ static RES_ITEM pool_items[] = {
    {"purgeoldestvolume", store_bool,  ITEM(res_pool.purge_oldest_volume), 0, 0, 0},
    {"recycleoldestvolume", store_bool,  ITEM(res_pool.recycle_oldest_volume), 0, 0, 0},
    {"recyclecurrentvolume", store_bool, ITEM(res_pool.recycle_current_volume), 0, 0, 0},
-   {"maximumvolumes",  store_pint,    ITEM(res_pool.max_volumes),   0, 0,        0},
-   {"maximumvolumejobs", store_pint,  ITEM(res_pool.MaxVolJobs),    0, 0,       0},
-   {"maximumvolumefiles", store_pint, ITEM(res_pool.MaxVolFiles),   0, 0,       0},
+   {"maximumvolumes",  store_pint32,    ITEM(res_pool.max_volumes),   0, 0,        0},
+   {"maximumvolumejobs", store_pint32,  ITEM(res_pool.MaxVolJobs),    0, 0,       0},
+   {"maximumvolumefiles", store_pint32, ITEM(res_pool.MaxVolFiles),   0, 0,       0},
    {"maximumvolumebytes", store_size, ITEM(res_pool.MaxVolBytes),   0, 0,       0},
    {"catalogfiles",    store_bool,    ITEM(res_pool.catalog_files),  0, ITEM_DEFAULT, true},
    {"volumeretention", store_time,    ITEM(res_pool.VolRetention),   0, ITEM_DEFAULT, 60*60*24*365},
@@ -383,8 +383,8 @@ static RES_ITEM pool_items[] = {
 static RES_ITEM counter_items[] = {
    {"name",            store_name,    ITEM(res_counter.hdr.name),        0, ITEM_REQUIRED, 0},
    {"description",     store_str,     ITEM(res_counter.hdr.desc),        0, 0,     0},
-   {"minimum",         store_int,     ITEM(res_counter.MinValue),        0, ITEM_DEFAULT, 0},
-   {"maximum",         store_pint,    ITEM(res_counter.MaxValue),        0, ITEM_DEFAULT, INT32_MAX},
+   {"minimum",         store_int32,   ITEM(res_counter.MinValue),        0, ITEM_DEFAULT, 0},
+   {"maximum",         store_pint32,  ITEM(res_counter.MaxValue),        0, ITEM_DEFAULT, INT32_MAX},
    {"wrapcounter",     store_res,     ITEM(res_counter.WrapCounter),     R_COUNTER, 0, 0},
    {"catalog",         store_res,     ITEM(res_counter.Catalog),         R_CATALOG, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
@@ -1556,7 +1556,7 @@ void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Store the type both pass 1 and pass 2 */
    for (i=0; migtypes[i].type_name; i++) {
       if (strcasecmp(lc->str, migtypes[i].type_name) == 0) {
-         *(int *)(item->value) = migtypes[i].job_type;
+         *(uint32_t *)(item->value) = migtypes[i].job_type;
          i = 0;
          break;
       }
@@ -1582,7 +1582,7 @@ void store_jobtype(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Store the type both pass 1 and pass 2 */
    for (i=0; jobtypes[i].type_name; i++) {
       if (strcasecmp(lc->str, jobtypes[i].type_name) == 0) {
-         *(int *)(item->value) = jobtypes[i].job_type;
+         *(uint32_t *)(item->value) = jobtypes[i].job_type;
          i = 0;
          break;
       }
@@ -1606,7 +1606,7 @@ void store_level(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Store the level pass 2 so that type is defined */
    for (i=0; joblevels[i].level_name; i++) {
       if (strcasecmp(lc->str, joblevels[i].level_name) == 0) {
-         *(int *)(item->value) = joblevels[i].level;
+         *(uint32_t *)(item->value) = joblevels[i].level;
          i = 0;
          break;
       }
@@ -1626,7 +1626,7 @@ void store_replace(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Scan Replacement options */
    for (i=0; ReplaceOptions[i].name; i++) {
       if (strcasecmp(lc->str, ReplaceOptions[i].name) == 0) {
-         *(int *)(item->value) = ReplaceOptions[i].token;
+         *(uint32_t *)(item->value) = ReplaceOptions[i].token;
          i = 0;
          break;
       }
@@ -1674,11 +1674,11 @@ static void store_runscript_when(LEX *lc, RES_ITEM *item, int index, int pass)
    lex_get_token(lc, T_NAME);
 
    if (strcasecmp(lc->str, "before") == 0) {
-      *(int *)(item->value) = SCRIPT_Before ;
+      *(uint32_t *)(item->value) = SCRIPT_Before ;
    } else if (strcasecmp(lc->str, "after") == 0) {
-      *(int *)(item->value) = SCRIPT_After;
+      *(uint32_t *)(item->value) = SCRIPT_After;
    } else if (strcasecmp(lc->str, "always") == 0) {
-      *(int *)(item->value) = SCRIPT_Any;
+      *(uint32_t *)(item->value) = SCRIPT_Any;
    } else {
       scan_err2(lc, _("Expect %s, got: %s"), "Before, After or Always", lc->str);
    }
index 61e4a32cdbeb45f9151b7b5e6d5a6c6f26f98048..d2244b0bb7d277daedcf04b138d4f10d06063545 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 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.
@@ -72,20 +72,20 @@ enum {
 /* Used for certain KeyWord tables */
 struct s_kw {
    const char *name;
-   int token;
+   int32_t token;
 };
 
 /* Job Level keyword structure */
 struct s_jl {
-   const char *level_name;                  /* level keyword */
-   int  level;                        /* level */
-   int  job_type;                     /* JobType permitting this level */
+   const char *level_name;            /* level keyword */
+   int32_t level;                     /* level */
+   int32_t job_type;                  /* JobType permitting this level */
 };
 
 /* Job Type keyword structure */
 struct s_jt {
    const char *type_name;
-   int job_type;
+   int32_t job_type;
 };
 
 /* Definition of the contents of each Resource */
@@ -147,10 +147,10 @@ public:
    RES hdr;
 
    bool found;                        /* found with SD */
-   int num_writers;                   /* number of writers */
-   int max_writers;                   /* = 1 for files */
-   int reserved;                      /* number of reserves */
-   int num_drives;                    /* for autochanger */
+   uint32_t num_writers;              /* number of writers */
+   uint32_t max_writers;              /* = 1 for files */
+   uint32_t reserved;                 /* number of reserves */
+   int32_t num_drives;                /* for autochanger */
    bool autochanger;                  /* set if device is autochanger */
    bool open;                         /* drive open */
    bool append;                       /* in append mode */
@@ -220,13 +220,13 @@ class CAT {
 public:
    RES   hdr;
 
-   int   db_port;                     /* Port */
+   uint32_t db_port;                  /* Port */
    char *db_address;                  /* host name for remote access */
    char *db_socket;                   /* Socket for local access */
    char *db_password;
    char *db_user;
    char *db_name;
-   int   mult_db_connections;         /* set if multiple connections wanted */
+   uint32_t mult_db_connections;         /* set if multiple connections wanted */
 
    /* Methods */
    char *name() const;
@@ -243,7 +243,7 @@ class CLIENT {
 public:
    RES   hdr;
 
-   int   FDport;                      /* Where File daemon listens */
+   uint32_t FDport;                   /* Where File daemon listens */
    utime_t FileRetention;             /* file retention period in seconds */
    utime_t JobRetention;              /* job retention period in seconds */
    utime_t heartbeat_interval;        /* Interval to send heartbeats */
@@ -277,8 +277,8 @@ class STORE {
 public:
    RES   hdr;
 
-   int   SDport;                      /* port where Directors connect */
-   int   SDDport;                     /* data port for File daemon */
+   uint32_t SDport;                   /* port where Directors connect */
+   uint32_t SDDport;                  /* data port for File daemon */
    char *address;
    char *password;
    char *media_type;
@@ -296,7 +296,7 @@ public:
    bool  autochanger;                 /* set if autochanger */
    int64_t StorageId;                 /* Set from Storage DB record */
    utime_t heartbeat_interval;        /* Interval to send heartbeats */
-   int  drives;                       /* number of drives in autochanger */
+   uint32_t drives;                   /* number of drives in autochanger */
 
    /* Methods */
    char *dev_name() const;
@@ -354,10 +354,10 @@ class JOB {
 public:
    RES   hdr;
 
-   int   JobType;                     /* job type (backup, verify, restore */
-   int   JobLevel;                    /* default backup/verify level */
-   int   Priority;                    /* Job priority */
-   int   RestoreJobId;                /* What -- JobId to restore */
+   uint32_t JobType;                  /* job type (backup, verify, restore */
+   uint32_t JobLevel;                 /* default backup/verify level */
+   uint32_t Priority;                 /* Job priority */
+   uint32_t RestoreJobId;             /* What -- JobId to restore */
    char *RestoreWhere;                /* Where on disk to restore -- directory */
    char *RegexWhere;                  /* RegexWhere option */
    char *strip_prefix;                /* remove prefix from filename  */
@@ -370,7 +370,7 @@ public:
       char *WriteBootstrap;           /* Where to write bootstrap Job updates */
       char *WriteVerifyList;          /* List of changed files */
    };
-   int   replace;                     /* How (overwrite, ..) */
+   uint32_t replace;                  /* How (overwrite, ..) */
    utime_t MaxRunTime;                /* max run time in seconds */
    utime_t MaxWaitTime;               /* max blocking time in seconds */
    utime_t FullMaxWaitTime;           /* Max Full job wait time */
@@ -381,7 +381,7 @@ public:
    utime_t JobRetention;              /* job retention period in seconds */
    uint32_t MaxConcurrentJobs;        /* Maximum concurrent jobs */
    int64_t spool_size;                /* Size of spool file for this job */
-   int RescheduleTimes;               /* Number of times to reschedule job */
+   int32_t RescheduleTimes;           /* Number of times to reschedule job */
    bool RescheduleOnError;            /* Set to reschedule on error */
    bool PrefixLinks;                  /* prefix soft links with Where path */
    bool PruneJobs;                    /* Force pruning of Jobs */
@@ -405,7 +405,7 @@ public:
    POOL      *inc_pool;               /* Pool for Incremental backups */
    POOL      *diff_pool;              /* Pool for Differental backups */
    char      *selection_pattern;
-   int        selection_type;
+   uint32_t  selection_type;
    union {
       JOB       *verify_job;          /* Job name to verify */
    };
@@ -444,7 +444,7 @@ struct FOPTS {
 struct INCEXE {
    FOPTS *current_opts;               /* points to current options structure */
    FOPTS **opts_list;                 /* options list */
-   int num_opts;                      /* number of options items */
+   int32_t num_opts;                  /* number of options items */
    alist name_list;                   /* filename list -- holds char * */
 };
 
@@ -458,9 +458,9 @@ public:
 
    bool new_include;                  /* Set if new include used */
    INCEXE **include_items;            /* array of incexe structures */
-   int num_includes;                  /* number in array */
+   int32_t num_includes;              /* number in array */
    INCEXE **exclude_items;
-   int num_excludes;
+   int32_t num_excludes;
    bool have_MD5;                     /* set if MD5 initialized */
    struct MD5Context md5c;            /* MD5 of include/exclude */
    char MD5[30];                      /* base 64 representation of MD5 */
@@ -514,7 +514,7 @@ public:
    char *pool_type;                   /* Pool type */
    char *label_format;                /* Label format string */
    char *cleaning_prefix;             /* Cleaning label prefix */
-   int32_t LabelType;                 /* Bacula/ANSI/IBM label type */
+   uint32_t LabelType;                /* Bacula/ANSI/IBM label type */
    uint32_t max_volumes;              /* max number of volumes */
    utime_t VolRetention;              /* volume retention period in seconds */
    utime_t VolUseDuration;            /* duration volume can be used */
@@ -572,9 +572,9 @@ union URES {
 class RUN {
 public:
    RUN *next;                         /* points to next run record */
-   int level;                         /* level override */
-   int Priority;                      /* priority override */
-   int job_type;
+   uint32_t level;                    /* level override */
+   uint32_t Priority;                 /* priority override */
+   uint32_t job_type;
    bool spool_data;                   /* Data spooling override */
    bool spool_data_set;               /* Data spooling override given */
    bool write_part_after_job;         /* Write part after job override */
@@ -587,8 +587,8 @@ public:
    STORE *storage;                    /* Storage override */
    MSGS *msgs;                        /* Messages override */
    char *since;
-   int level_no;
-   int minute;                        /* minute to run job */
+   uint32_t level_no;
+   uint32_t minute;                   /* minute to run job */
    time_t last_run;                   /* last time run */
    time_t next_run;                   /* next time to run */
    char hour[nbytes_for_bits(24)];    /* bit set for each hour */
index 427bc4bcfb6e9ce11aaff2f63d8ecbe42881a7f7..6df06e0a83bb0a474a82012958b8fe82bd09ce53 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 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.
@@ -96,11 +96,11 @@ static RES_ITEM cli_items[] = {
    {"piddirectory",  store_dir,     ITEM(res_client.pid_directory),     0, ITEM_REQUIRED, 0},
    {"subsysdirectory",  store_dir,  ITEM(res_client.subsys_directory),  0, 0, 0},
    {"scriptsdirectory",  store_dir,  ITEM(res_client.scripts_directory),  0, 0, 0},
-   {"maximumconcurrentjobs", store_pint,  ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 20},
+   {"maximumconcurrentjobs", store_pint32,  ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 20},
    {"messages",      store_res, ITEM(res_client.messages), R_MSGS, 0, 0},
    {"sdconnecttimeout", store_time,ITEM(res_client.SDConnectTimeout), 0, ITEM_DEFAULT, 60 * 30},
    {"heartbeatinterval", store_time, ITEM(res_client.heartbeat_interval), 0, ITEM_DEFAULT, 0},
-   {"maximumnetworkbuffersize", store_pint, ITEM(res_client.max_network_buffer_size), 0, 0, 0},
+   {"maximumnetworkbuffersize", store_pint32, ITEM(res_client.max_network_buffer_size), 0, 0, 0},
 #ifdef DATA_ENCRYPTION
    {"pkisignatures",         store_bool,    ITEM(res_client.pki_sign), 0, ITEM_DEFAULT, 0},
    {"pkiencryption",         store_bool,    ITEM(res_client.pki_encrypt), 0, ITEM_DEFAULT, 0},
index c64b35d17df5084cb2f084e3ca74986f982d6df0..8801f64381a8fb4694f5d5db331bf43e0178f30e 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-20087 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.
@@ -80,7 +80,7 @@ struct CLIENT {
    char *subsys_directory;
    char *scripts_directory;
    MSGS *messages;                    /* daemon message handler */
-   int MaxConcurrentJobs;
+   uint32_t MaxConcurrentJobs;
    utime_t SDConnectTimeout;          /* timeout in seconds */
    utime_t heartbeat_interval;        /* Interval to send heartbeats */
    uint32_t max_network_buffer_size;  /* max network buf size */
index e0e605450d558fdef452db96b3fc407983276961..e3546291fbb3cab8a203b1ca6a315c15a82a4f3a 100644 (file)
@@ -1,26 +1,3 @@
-/*
- *   Main configuration file parser for Bacula User Agent
- *    some parts may be split into separate files such as
- *    the schedule configuration (sch_config.c).
- *
- *   Note, the configuration file parser consists of three parts
- *
- *   1. The generic lexical scanner in lib/lex.c and lib/lex.h
- *
- *   2. The generic config  scanner in lib/parse_config.c and
- *      lib/parse_config.h.
- *      These files contain the parser code, some utility
- *      routines, and the common store routines (name, int,
- *      string).
- *
- *   3. The daemon specific file, which contains the Resource
- *      definitions as well as any specific store routines
- *      for the resource records.
- *
- *     Kern Sibbald, January MM, September MM
- *
- *     Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *   Main configuration file parser for Bacula User Agent
+ *    some parts may be split into separate files such as
+ *    the schedule configuration (sch_config.c).
+ *
+ *   Note, the configuration file parser consists of three parts
+ *
+ *   1. The generic lexical scanner in lib/lex.c and lib/lex.h
+ *
+ *   2. The generic config  scanner in lib/parse_config.c and
+ *      lib/parse_config.h.
+ *      These files contain the parser code, some utility
+ *      routines, and the common store routines (name, int,
+ *      string).
+ *
+ *   3. The daemon specific file, which contains the Resource
+ *      definitions as well as any specific store routines
+ *      for the resource records.
+ *
+ *     Kern Sibbald, January MM, September MM
+ *
+ *     Version $Id$
+ */
 
 #include "bacula.h"
 #include "console_conf.h"
@@ -79,7 +79,7 @@ int  res_all_size = sizeof(res_all);
 static RES_ITEM dir_items[] = {
    {"name",        store_name,     ITEM(dir_res.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(dir_res.hdr.desc), 0, 0, 0},
-   {"dirport",     store_int,      ITEM(dir_res.DIRport),  0, ITEM_DEFAULT, 9101},
+   {"dirport",     store_pint32,   ITEM(dir_res.DIRport),  0, ITEM_DEFAULT, 9101},
    {"address",     store_str,      ITEM(dir_res.address),  0, ITEM_REQUIRED, 0},
    {"password",    store_password, ITEM(dir_res.password), 0, 0, 0},
    {"tlsenable",      store_bool,    ITEM(dir_res.tls_enable), 1, 0, 0},
index e5c5426d7323d7408b4809f8a9dad5d165e321b7..6aa5774757f6ebb2476f219addbe6269c04f1a5b 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * Bacula GNOME User Agent specific configuration and defines
- *
- *     Kern Sibbald, March 2002
- *
- *     Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * Bacula GNOME User Agent specific configuration and defines
+ *
+ *     Kern Sibbald, March 2002
+ *
+ *     Version $Id$
+ */
 
 #ifndef __CONSOLE_CONF_H_
 #define __CONSOLE_CONF_H_
@@ -63,7 +63,7 @@ enum {
 /* Definition of the contents of each Resource */
 struct DIRRES {
    RES   hdr;
-   int   DIRport;                     /* UA server port */
+   uint32_t DIRport;                  /* UA server port */
    char *address;                     /* UA server address */
    char *password;                    /* UA server password */
    bool tls_enable;                   /* Enable TLS */
index 88125948615b828fc9093674af375a32192ad532..76a1916e7d6c3e6f9431d1170acb4670a17cef55 100644 (file)
@@ -127,13 +127,13 @@ typedef void (JCR_free_HANDLER)(JCR *jcr);
 class JCR {
 private:
    pthread_mutex_t mutex;             /* jcr mutex */
-   volatile int _use_count;           /* use count */
+   volatile int32_t _use_count;       /* use count */
 public:
    void lock() {P(mutex); };
    void unlock() {V(mutex); };
    void inc_use_count(void) {lock(); _use_count++; unlock(); };
    void dec_use_count(void) {lock(); _use_count--; unlock(); };
-   int  use_count() { return _use_count; };
+   int32_t use_count() { return _use_count; };
    void init_mutex(void) {pthread_mutex_init(&mutex, NULL); };
    void destroy_mutex(void) {pthread_mutex_destroy(&mutex); };
    bool is_job_canceled() {return job_canceled(this); };
@@ -160,10 +160,10 @@ public:
    uint64_t JobBytes;                 /* Number of bytes processed this job */
    uint64_t ReadBytes;                /* Bytes read -- before compression */
    uint32_t Errors;                   /* Number of non-fatal errors */
-   volatile int JobStatus;            /* ready, running, blocked, terminated */
-   int JobType;                       /* backup, restore, verify ... */
-   int JobLevel;                      /* Job level */
-   int JobPriority;                   /* Job priority */
+   volatile int32_t JobStatus;        /* ready, running, blocked, terminated */
+   int32_t JobType;                   /* backup, restore, verify ... */
+   int32_t JobLevel;                  /* Job level */
+   int32_t JobPriority;               /* Job priority */
    time_t sched_time;                 /* job schedule time, i.e. when it should start */
    time_t start_time;                 /* when job actually started */
    time_t run_time;                   /* used for computing speed */
@@ -177,7 +177,7 @@ public:
    char *where;                       /* prefix to restore files to */
    char *RegexWhere;                  /* file relocation in restore */
    alist *where_bregexp;              /* BREGEXP alist for path manipulation */
-   int cached_pnl;                    /* cached path length */
+   int32_t cached_pnl;                /* cached path length */
    POOLMEM *cached_path;              /* cached path */
    bool prefix_links;                 /* Prefix links with Where path */
    bool gui;                          /* set if gui using console */
@@ -224,8 +224,8 @@ public:
    uint32_t SDJobFiles;               /* Number of files written, this job */
    uint64_t SDJobBytes;               /* Number of bytes processed this job */
    uint32_t SDErrors;                 /* Number of non-fatal errors */
-   volatile int SDJobStatus;          /* Storage Job Status */
-   volatile int FDJobStatus;          /* File daemon Job Status */
+   volatile int32_t SDJobStatus;      /* Storage Job Status */
+   volatile int32_t FDJobStatus;      /* File daemon Job Status */
    uint32_t ExpectedFiles;            /* Expected restore files */
    uint32_t MediaId;                  /* DB record IDs associated with this job */
    FileId_t FileId;                   /* Last file id inserted */
@@ -246,9 +246,9 @@ public:
    POOLMEM *rpool_source;             /* Where migrate read pool came from */
    POOLMEM *rstore_source;            /* Where read storage came from */
    POOLMEM *wstore_source;            /* Where write storage came from */
-   int replace;                       /* Replace option */
-   int NumVols;                       /* Number of Volume used in pool */
-   int reschedule_count;              /* Number of times rescheduled */
+   int32_t replace;                   /* Replace option */
+   int32_t NumVols;                   /* Number of Volume used in pool */
+   int32_t reschedule_count;          /* Number of times rescheduled */
    int64_t spool_size;                /* Spool size for this job */
    bool spool_data;                   /* Spool data in SD */
    bool acquired_resource_locks;      /* set if resource locks acquired */
@@ -278,8 +278,8 @@ public:
    POOLMEM *compress_buf;             /* Compression buffer */
    int32_t compress_buf_size;         /* Length of compression buffer */
    void *pZLIB_compress_workset;      /* zlib compression session data */
-   int replace;                       /* Replace options */
-   int buf_size;                      /* length of buffer */
+   int32_t replace;                   /* Replace options */
+   int32_t buf_size;                  /* length of buffer */
    FF_PKT *ff;                        /* Find Files packet */
    char stored_addr[MAX_NAME_LENGTH]; /* storage daemon address */
    uint32_t StartFile;
@@ -320,7 +320,7 @@ public:
    int32_t NumWriteVolumes;           /* number of volumes written */
    int32_t NumReadVolumes;            /* total number of volumes to read */
    int32_t CurReadVolume;             /* current read volume number */
-   int label_errors;                  /* count of label errors */
+   int32_t label_errors;              /* count of label errors */
    bool session_opened;
    long Ticket;                       /* ticket for this job */
    bool ignore_label_errors;          /* ignore Volume label errors */
@@ -328,7 +328,7 @@ public:
    bool no_attributes;                /* set if no attributes wanted */
    int64_t spool_size;                /* Spool size for this job */
    bool spool_data;                   /* set to spool data */
-   int CurVol;                        /* Current Volume count */
+   int32_t CurVol;                    /* Current Volume count */
    DIRRES* director;                  /* Director resource */
    alist *write_store;                /* list of write storage devices sent by DIR */ 
    alist *read_store;                 /* list of read devices sent by DIR */
@@ -348,12 +348,12 @@ public:
    uint32_t read_StartBlock;
    uint32_t read_EndBlock;
    /* Device wait times */
-   int min_wait;
-   int max_wait;
-   int max_num_wait;
-   int wait_sec;
-   int rem_wait_sec;
-   int num_wait;
+   int32_t min_wait;
+   int32_t max_wait;
+   int32_t max_num_wait;
+   int32_t wait_sec;
+   int32_t rem_wait_sec;
+   int32_t num_wait;
 
 #endif /* STORAGE_DAEMON */
 
@@ -365,10 +365,10 @@ public:
  */
 struct s_last_job {
    dlink link;
-   int Errors;                        /* FD/SD errors */
-   int JobType;
-   int JobStatus;
-   int JobLevel;
+   int32_t Errors;                     /* FD/SD errors */
+   int32_t JobType;
+   int32_t JobStatus;
+   int32_t JobLevel;
    uint32_t JobId;
    uint32_t VolSessionId;
    uint32_t VolSessionTime;
index c581c422c398126e06468e72132016ed2152269a..e03d449a792e49e0b3071fee2145929a95296816 100644 (file)
@@ -130,7 +130,7 @@ RES_ITEM msgs_items[] = {
 
 struct s_mtypes {
    const char *name;
-   int token;
+   uint32_t token;
 };
 /* Various message types */
 static struct s_mtypes msg_types[] = {
@@ -156,7 +156,7 @@ static struct s_mtypes msg_types[] = {
 /* Used for certain KeyWord tables */
 struct s_kw {
    const char *name;
-   int token;
+   uint32_t token;
 };
 
 /*
@@ -212,12 +212,12 @@ static void init_resource(int type, RES_ITEM *items, int pass)
             items[i].default_value);
       if (items[i].flags & ITEM_DEFAULT && items[i].default_value != 0) {
          if (items[i].handler == store_bit) {
-            *(int *)(items[i].value) |= items[i].code;
+            *(uint32_t *)(items[i].value) |= items[i].code;
          } else if (items[i].handler == store_bool) {
             *(bool *)(items[i].value) = items[i].default_value != 0;
-         } else if (items[i].handler == store_pint ||
-                    items[i].handler == store_int) {
-            *(int *)(items[i].value) = items[i].default_value;
+         } else if (items[i].handler == store_pint32 ||
+                    items[i].handler == store_int32) {
+            *(int32_t *)(items[i].value) = items[i].default_value;
          } else if (items[i].handler == store_int64) {
             *(int64_t *)(items[i].value) = items[i].default_value;
          } else if (items[i].handler == store_size) {
@@ -600,19 +600,19 @@ void store_defs(LEX *lc, RES_ITEM *item, int index, int pass)
 
 
 /* Store an integer at specified address */
-void store_int(LEX *lc, RES_ITEM *item, int index, int pass)
+void store_int32(LEX *lc, RES_ITEM *item, int index, int pass)
 {
    lex_get_token(lc, T_INT32);
-   *(int *)(item->value) = lc->int32_val;
+   *(int32_t *)(item->value) = lc->int32_val;
    scan_to_eol(lc);
    set_bit(index, res_all.hdr.item_present);
 }
 
 /* Store a positive integer at specified address */
-void store_pint(LEX *lc, RES_ITEM *item, int index, int pass)
+void store_pint32(LEX *lc, RES_ITEM *item, int index, int pass)
 {
    lex_get_token(lc, T_PINT32);
-   *(int *)(item->value) = lc->pint32_val;
+   *(uint32_t *)(item->value) = lc->pint32_val;
    scan_to_eol(lc);
    set_bit(index, res_all.hdr.item_present);
 }
@@ -716,9 +716,9 @@ void store_bit(LEX *lc, RES_ITEM *item, int index, int pass)
 {
    lex_get_token(lc, T_NAME);
    if (strcasecmp(lc->str, "yes") == 0 || strcasecmp(lc->str, "true") == 0) {
-      *(int *)(item->value) |= item->code;
+      *(uint32_t *)(item->value) |= item->code;
    } else if (strcasecmp(lc->str, "no") == 0 || strcasecmp(lc->str, "false") == 0) {
-      *(int *)(item->value) &= ~(item->code);
+      *(uint32_t *)(item->value) &= ~(item->code);
    } else {
       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
    }
@@ -754,7 +754,7 @@ void store_label(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Store the label pass 2 so that type is defined */
    for (i=0; tapelabels[i].name; i++) {
       if (strcasecmp(lc->str, tapelabels[i].name) == 0) {
-         *(int *)(item->value) = tapelabels[i].token;
+         *(uint32_t *)(item->value) = tapelabels[i].token;
          i = 0;
          break;
       }
index 3e630b55fc198a9a7c043b45256500c4a08caa2c..58941df4fd7ef92c0fe37d73fe6ccde096829a9f 100644 (file)
@@ -57,9 +57,9 @@ struct RES_ITEM {
       RES *resvalue;
       RES **presvalue;
    };
-   int  code;                         /* item code/additional info */
-   int  flags;                        /* flags: default, required, ... */
-   int  default_value;                /* default value */
+   int32_t code;                       /* item code/additional info */
+   int32_t flags;                      /* flags: default, required, ... */
+   int32_t default_value;              /* default value */
 };
 
 /* For storing name_addr items in res_items table */
@@ -76,8 +76,8 @@ public:
    RES *next;                         /* pointer to next resource of this type */
    char *name;                        /* resource name */
    char *desc;                        /* resource description */
-   int   rcode;                       /* resource id or type */
-   int   refcnt;                      /* reference count for releasing */
+   uint32_t rcode;                    /* resource id or type */
+   int32_t refcnt;                    /* reference count for releasing */
    char  item_present[MAX_RES_ITEMS]; /* set if item is present in conf file */
 };
 
@@ -90,7 +90,7 @@ public:
 struct RES_TABLE {
    const char *name;                  /* resource name */
    RES_ITEM *items;                   /* list of resource keywords */
-   int rcode;                         /* code if needed */
+   uint32_t rcode;                    /* code if needed */
 };
 
 /* Common Resource definitions */
@@ -153,8 +153,8 @@ void store_strname(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_res(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_alist_res(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_alist_str(LEX *lc, RES_ITEM *item, int index, int pass);
-void store_int(LEX *lc, RES_ITEM *item, int index, int pass);
-void store_pint(LEX *lc, RES_ITEM *item, int index, int pass);
+void store_int32(LEX *lc, RES_ITEM *item, int index, int pass);
+void store_pint32(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_msgs(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_int64(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_bit(LEX *lc, RES_ITEM *item, int index, int pass);
index 1a08709592ddbb82c8a90b0572037a32b29bc633..c28febacdc691c63e68f22cc10ec92e4a870ff12 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 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.
@@ -79,7 +79,7 @@ int  res_all_size = sizeof(res_all);
 static RES_ITEM dir_items[] = {
    {"name",        store_name,     ITEM(dir_res.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(dir_res.hdr.desc), 0, 0, 0},
-   {"dirport",     store_int,      ITEM(dir_res.DIRport),  0, ITEM_DEFAULT, 9101},
+   {"dirport",     store_pint32,   ITEM(dir_res.DIRport),  0, ITEM_DEFAULT, 9101},
    {"address",     store_str,      ITEM(dir_res.address),  0, ITEM_REQUIRED, 0},
    {"password",    store_password, ITEM(dir_res.password), 0, 0, 0},
    {"tlsenable",      store_bool,    ITEM(dir_res.tls_enable), 1, 0, 0},
index bcb6faa988776c23fc89fc3a3f789229fb4ec7ce..493d5ef19f0a9a58c09960411b7e96177227a657 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2008 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.
@@ -64,7 +64,7 @@ enum {
 class DIRRES {
 public:
    RES   hdr;
-   int   DIRport;                     /* UA server port */
+   uint32_t DIRport;                  /* UA server port */
    char *address;                     /* UA server address */
    char *password;                    /* UA server password */
    bool tls_enable;                   /* Enable TLS */
index 497c9fae5f4d8d76de1bc13c535eead53c19b9ff..0cc257f4eeba7da59688a3a9a3fee494a1165d15 100644 (file)
@@ -75,8 +75,8 @@ static RES_ITEM store_items[] = {
    {"piddirectory",          store_dir,  ITEM(res_store.pid_directory), 0, ITEM_REQUIRED, 0},
    {"subsysdirectory",       store_dir,  ITEM(res_store.subsys_directory), 0, 0, 0},
    {"scriptsdirectory",      store_dir,  ITEM(res_store.scripts_directory), 0, 0, 0},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_store.max_concurrent_jobs), 0, ITEM_DEFAULT, 20},
-   {"heartbeatinterval",     store_time, ITEM(res_store.heartbeat_interval), 0, ITEM_DEFAULT, 0},
+   {"maximumconcurrentjobs", store_pint32,  ITEM(res_store.max_concurrent_jobs), 0, ITEM_DEFAULT, 20},
+   {"heartbeatinterval",     store_time,    ITEM(res_store.heartbeat_interval), 0, ITEM_DEFAULT, 0},
    {"tlsenable",             store_bool,    ITEM(res_store.tls_enable), 1, 0, 0},
    {"tlsrequire",            store_bool,    ITEM(res_store.tls_require), 1, 0, 0},
    {"tlsverifypeer",         store_bool,    ITEM(res_store.tls_verify_peer), 1, ITEM_DEFAULT, 1},
@@ -143,19 +143,19 @@ static RES_ITEM dev_items[] = {
    {"alertcommand",          store_strname,ITEM(res_dev.alert_command), 0, 0, 0},
    {"maximumchangerwait",    store_time,   ITEM(res_dev.max_changer_wait), 0, ITEM_DEFAULT, 5 * 60},
    {"maximumopenwait",       store_time,   ITEM(res_dev.max_open_wait), 0, ITEM_DEFAULT, 5 * 60},
-   {"maximumopenvolumes",    store_pint,   ITEM(res_dev.max_open_vols), 0, ITEM_DEFAULT, 1},
-   {"maximumnetworkbuffersize", store_pint, ITEM(res_dev.max_network_buffer_size), 0, 0, 0},
+   {"maximumopenvolumes",    store_pint32, ITEM(res_dev.max_open_vols), 0, ITEM_DEFAULT, 1},
+   {"maximumnetworkbuffersize", store_pint32, ITEM(res_dev.max_network_buffer_size), 0, 0, 0},
    {"volumepollinterval",    store_time,   ITEM(res_dev.vol_poll_interval), 0, 0, 0},
    {"maximumrewindwait",     store_time,   ITEM(res_dev.max_rewind_wait), 0, ITEM_DEFAULT, 5 * 60},
-   {"minimumblocksize",      store_pint,   ITEM(res_dev.min_block_size), 0, 0, 0},
-   {"maximumblocksize",      store_pint,   ITEM(res_dev.max_block_size), 0, 0, 0},
+   {"minimumblocksize",      store_pint32, ITEM(res_dev.min_block_size), 0, 0, 0},
+   {"maximumblocksize",      store_pint32, ITEM(res_dev.max_block_size), 0, 0, 0},
    {"maximumvolumesize",     store_size,   ITEM(res_dev.max_volume_size), 0, 0, 0},
    {"maximumfilesize",       store_size,   ITEM(res_dev.max_file_size), 0, ITEM_DEFAULT, 1000000000},
    {"volumecapacity",        store_size,   ITEM(res_dev.volume_capacity), 0, 0, 0},
    {"spooldirectory",        store_dir,    ITEM(res_dev.spool_directory), 0, 0, 0},
    {"maximumspoolsize",      store_size,   ITEM(res_dev.max_spool_size), 0, 0, 0},
    {"maximumjobspoolsize",   store_size,   ITEM(res_dev.max_job_spool_size), 0, 0, 0},
-   {"driveindex",            store_pint,   ITEM(res_dev.drive_index), 0, 0, 0},
+   {"driveindex",            store_pint32, ITEM(res_dev.drive_index), 0, 0, 0},
    {"maximumpartsize",       store_size,   ITEM(res_dev.max_part_size), 0, ITEM_DEFAULT, 0},
    {"mountpoint",            store_strname,ITEM(res_dev.mount_point), 0, 0, 0},
    {"mountcommand",          store_strname,ITEM(res_dev.mount_command), 0, 0, 0},
@@ -222,7 +222,7 @@ static void store_devtype(LEX *lc, RES_ITEM *item, int index, int pass)
    /* Store the label pass 2 so that type is defined */
    for (i=0; dev_types[i].name; i++) {
       if (strcasecmp(lc->str, dev_types[i].name) == 0) {
-         *(int *)(item->value) = dev_types[i].token;
+         *(uint32_t *)(item->value) = dev_types[i].token;
          i = 0;
          break;
       }
index 3a3ae8082c845c07da1b9e3c799a437e00122c36..5ffc91fa041006fb110fb1a551d0887e4f57aac4 100644 (file)
@@ -124,11 +124,11 @@ public:
    char *changer_command;             /* Changer command  -- external program */
    char *alert_command;               /* Alert command -- external program */
    char *spool_directory;             /* Spool file directory */
-   int   dev_type;                    /* device type */
-   int   label_type;                  /* label type */
+   uint32_t dev_type;                 /* device type */
+   uint32_t label_type;               /* label type */
    bool autoselect;                   /* Automatically select from AutoChanger */
    uint32_t drive_index;              /* Autochanger drive index */
-   int cap_bits;                      /* Capabilities of this device */
+   uint32_t cap_bits;                 /* Capabilities of this device */
    utime_t max_changer_wait;          /* Changer timeout */
    utime_t max_rewind_wait;           /* maximum secs to wait for rewind */
    utime_t max_open_wait;             /* maximum secs to wait for open */
index b881241addf57b4f2b1891d4b7a31ba792d54cf2..d6d866ef52dd76b0396741a71f555b2801408f8c 100644 (file)
@@ -94,7 +94,7 @@ static RES_ITEM mon_items[] = {
 static RES_ITEM dir_items[] = {
    {"name",        store_name,     ITEM(res_dir.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(res_dir.hdr.desc), 0, 0, 0},
-   {"dirport",     store_int,      ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
+   {"dirport",     store_pint32,   ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
    {"address",     store_str,      ITEM(res_dir.address),  0, 0, 0},
    {"enablessl",   store_bool,     ITEM(res_dir.enable_ssl), 1, ITEM_DEFAULT, 0},
    {NULL, NULL, {0}, 0, 0, 0}
@@ -110,7 +110,7 @@ static RES_ITEM cli_items[] = {
    {"name",     store_name,       ITEM(res_client.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description", store_str,     ITEM(res_client.hdr.desc), 0, 0, 0},
    {"address",  store_str,        ITEM(res_client.address),  0, ITEM_REQUIRED, 0},
-   {"fdport",   store_pint,       ITEM(res_client.FDport),   0, ITEM_DEFAULT, 9102},
+   {"fdport",   store_pint32,     ITEM(res_client.FDport),   0, ITEM_DEFAULT, 9102},
    {"password", store_password,   ITEM(res_client.password), 0, ITEM_REQUIRED, 0},
    {"enablessl", store_bool,      ITEM(res_client.enable_ssl), 1, ITEM_DEFAULT, 0},
    {NULL, NULL, {0}, 0, 0, 0}
@@ -123,7 +123,7 @@ static RES_ITEM cli_items[] = {
 static RES_ITEM store_items[] = {
    {"name",        store_name,     ITEM(res_store.hdr.name),   0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(res_store.hdr.desc),   0, 0, 0},
-   {"sdport",      store_pint,     ITEM(res_store.SDport),     0, ITEM_DEFAULT, 9103},
+   {"sdport",      store_pint32,   ITEM(res_store.SDport),     0, ITEM_DEFAULT, 9103},
    {"address",     store_str,      ITEM(res_store.address),    0, ITEM_REQUIRED, 0},
    {"sdaddress",   store_str,      ITEM(res_store.address),    0, 0, 0},
    {"password",    store_password, ITEM(res_store.password),   0, ITEM_REQUIRED, 0},
index babcf4b9b1e05d27c860cfb85351c3d6bc6fbd81..1e8b5caa361e511531235b26a4a490e0ce0908a8 100644 (file)
@@ -65,7 +65,7 @@ enum {
 /* Director */
 struct DIRRES {
    RES   hdr;
-   int   DIRport;                     /* UA server port */
+   uint32_t DIRport;                  /* UA server port */
    char *address;                     /* UA server address */
    bool enable_ssl;                   /* Use SSL */
 };
@@ -76,7 +76,7 @@ struct DIRRES {
  */
 struct MONITOR {
    RES   hdr;
-   int require_ssl;                   /* Require SSL for all connections */
+   bool require_ssl;                  /* Require SSL for all connections */
    MSGS *messages;                    /* Daemon message handler */
    char *password;                    /* UA server password */
    utime_t RefreshInterval;           /* Status refresh interval */
@@ -92,7 +92,7 @@ struct MONITOR {
 struct CLIENT {
    RES   hdr;
 
-   int   FDport;                      /* Where File daemon listens */
+   uint32_t FDport;                   /* Where File daemon listens */
    char *address;
    char *password;
    bool enable_ssl;                   /* Use SSL */
@@ -105,7 +105,7 @@ struct CLIENT {
 struct STORE {
    RES   hdr;
 
-   int   SDport;                      /* port where Directors connect */
+   uint32_t SDport;                   /* port where Directors connect */
    char *address;
    char *password;
    bool enable_ssl;                   /* Use SSL */
index 088e41feeb9c93e0248331618d64bb3faff72075..8d48da2278f10c3bd50e9a54317819a42593fca9 100644 (file)
@@ -114,7 +114,7 @@ static RES_ITEM cons_items[] = {
 static RES_ITEM dir_items[] = {
    {"name",        store_name,     ITEM(res_dir.hdr.name), 0, ITEM_REQUIRED, 0},
    {"description", store_str,      ITEM(res_dir.hdr.desc), 0, 0, 0},
-   {"dirport",     store_int,      ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
+   {"dirport",     store_pint32,   ITEM(res_dir.DIRport),  0, ITEM_DEFAULT, 9101},
    {"address",     store_str,      ITEM(res_dir.address),  0, 0, 0},
    {"password",    store_password, ITEM(res_dir.password), 0, ITEM_REQUIRED, 0},
    {"tlscacertificatefile", store_dir, ITEM(res_dir.tls_ca_certfile), 0, 0, 0},
index 45a0dbf63c23160a7049ff784b142f8319d84113..1c8e4b091d580eb0f2361404d752a99f469b3895 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
@@ -28,6 +25,9 @@
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * Version $Id$
+ */
 
 #ifndef CONSOLECONF_H
 #define CONSOLECONF_H
@@ -75,7 +75,7 @@ struct CONRES {
 /* Director */
 struct DIRRES {
    RES   hdr;
-   int   DIRport;                     /* UA server port */
+   uint32_t DIRport;                  /* UA server port */
    char *address;                     /* UA server address */
    char *password;                    /* UA server password */
    char *tls_ca_certfile;             /* TLS CA Certificate File */
index 34891bd9e228b96a723433a6fbc04bbc92b52c05..0699fe85f775cabe5e2eab1bf0729b595182d95d 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.2
 
 General:
+18Jun08
+kes  More work on word alignments -- eliminate all ints from 
+     the configuration routines.
 17Jun08
 kes  Fix bug reported by Scott Barninger where the bacula script
      refers to scripts in the wrong directory. Needed to meet the