]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/jcr.h
Server address binding + bscan updates -- see kes25Sep02
[bacula/bacula] / bacula / src / jcr.h
index db4574600dc5e0cfa83dd14a89efe0f25f93ae6e..dc4d775ba1a5d9c685c381b98c359b1684f6808f 100644 (file)
@@ -107,7 +107,8 @@ struct s_jcr {
    POOLMEM *client_name;              /* client name */
    char *RestoreBootstrap;            /* Bootstrap file to restore */
    char *sd_auth_key;                 /* SD auth key */
-   MSGS *msgs;                        /* Message resource */
+   MSGS *jcr_msgs;                    /* Copy of message resource -- actually used */
+   uint32_t ClientId;                 /* Client associated with Job */
 
    /* Daemon specific part of JCR */
    /* This should be empty in the library */
@@ -124,11 +125,11 @@ struct s_jcr {
    POOL *pool;                        /* Pool resource */
    FILESET *fileset;                  /* FileSet resource */
    CAT *catalog;                      /* Catalog resource */
+   MSGS *messages;                    /* Default message handler */
    int SDJobStatus;                   /* Storage Job Status */
    int mode;                          /* manual/auto run */
    B_DB *db;                          /* database pointer */
-   int MediaId;                       /* DB record IDs associated with this job */
-   int ClientId;                      /* Client associated with file */
+   uint32_t MediaId;                  /* DB record IDs associated with this job */
    uint32_t PoolId;                   /* Pool record id */
    FileId_t FileId;                   /* Last file id inserted */
    uint32_t FileIndex;                /* Last FileIndex processed */
@@ -136,14 +137,14 @@ struct s_jcr {
    int fn_printed;                    /* printed filename */
    POOLMEM *stime;                    /* start time for incremental/differential */
    JOB_DBR jr;                        /* Job record in Database */
-   int RestoreJobId;                  /* Id specified by UA */
+   uint32_t RestoreJobId;             /* Id specified by UA */
    char *RestoreWhere;                /* Where to restore the files */
 #endif /* DIRECTOR_DAEMON */
 
 #ifdef FILE_DAEMON
    /* File Daemon specific part of JCR */
    uint32_t num_files_examined;       /* files examined this job */
-   char *last_fname;                  /* last file saved */
+   POOLMEM *last_fname;               /* last file saved/verified */
    /*********FIXME********* add missing files and files to be retried */
    int incremental;                   /* set if incremental for SINCE */
    time_t mtime;                      /* begin time for SINCE */
@@ -166,6 +167,8 @@ struct s_jcr {
 
 #ifdef STORAGE_DAEMON
    /* Storage Daemon specific part of JCR */
+   struct s_jcr *next_dev;            /* next JCR attached to device */
+   struct s_jcr *prev_dev;            /* previous JCR attached to device */
    pthread_cond_t job_start_wait;     /* Wait for FD to start Job */
    int type;
    DEVRES *device;                    /* device to use */
@@ -180,12 +183,15 @@ struct s_jcr {
    long NumVolumes;                   /* number of volumes used */
    long CurVolume;                    /* current volume number */
    int mode;                          /* manual/auto run */
+   int spool_attributes;              /* set if spooling attributes */
+   int no_attributes;                 /* set if no attributes wanted */
    int label_status;                  /* device volume label status */
    int label_errors;                  /* count of label errors */
    int session_opened;
    DEV_RECORD rec;                    /* Read/Write record */
    long Ticket;                       /* ticket for this job */
    uint32_t VolFirstFile;             /* First file index this Volume */
+   uint32_t FileIndex;                /* Current File Index */
    uint32_t start_block;              /* Start write block */
    uint32_t start_file;               /* Start write file */
    uint32_t end_block;                /* Ending block written */
@@ -233,6 +239,7 @@ extern JCR *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr);
 extern void free_jcr(JCR *jcr);
 extern void free_locked_jcr(JCR *jcr);
 extern JCR *get_jcr_by_id(uint32_t JobId);
+extern JCR *get_jcr_by_session(uint32_t SessionId, uint32_t SessionTime);
 extern JCR *get_jcr_by_partial_name(char *Job);
 extern JCR *get_jcr_by_full_name(char *Job);
 extern JCR *get_next_jcr(JCR *jcr);