]> git.sur5r.net Git - bacula/bacula/commitdiff
Set correct SD->FD Job term status
authorKern Sibbald <kern@sibbald.com>
Mon, 16 Jun 2003 19:16:39 +0000 (19:16 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 16 Jun 2003 19:16:39 +0000 (19:16 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@583 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ReleaseNotes
bacula/kernstodo
bacula/src/stored/append.c
bacula/src/stored/dircmd.c
bacula/src/stored/fd_cmds.c
bacula/src/stored/job.c

index 55bab38cd161bd8656905be515e67d6f9440841f..186246c342b890d34230415e8b9536f1f21e5bab 100644 (file)
@@ -1,7 +1,7 @@
 
           Release Notes for Bacula 1.31
 
-  Bacula code: Total files = 246 Total lines = 70,476 (*.h *.c *.in)
+  Bacula code: Total files = 250 Total lines = 74,253 (*.h *.c *.in)
 
 Major Changes this Release:
 - The database format has changed. Please see below.
@@ -15,6 +15,7 @@ Major Changes this Release:
   and underscore.
 - Added readline to depkgs (removed from depkgs1) and fixed configuration if
   it is not installed in your system libraries.
+- Implemented generalized tape label formats including counter variables.
 
 
 Other Changes this Release:
index ec97e8ec6b45429f370d731517ac73644a66ad09..9bd45237ecf0a5e0b39e65b12efd32414d88320a 100644 (file)
@@ -398,7 +398,7 @@ Done -- Restore part needs better implementation to work correctly
 
 
 Item 2:   Make the Storage daemon use intermediate file storage to buffer data.
-Deferred -- not necessary yet.
+Deferred -- not necessary yet -- possibly implement with Migration.
 
   What:   If data is coming into the SD too fast, buffer it to 
           disk if the user has configured this option.
@@ -454,6 +454,7 @@ Item 4:   Implement Base jobs.
 
 
 Item 5:   Implement Label templates
+Done 
 
   What:   This is a mechanism whereby Bacula can automatically create
           a tape label for new tapes according to a detailed specification
@@ -507,7 +508,6 @@ Item 8:   GUI for interactive backup
 
 
 Item 9:   Add SSL to daemon communications.
-Inprogress as of version 1.31.
 
   What:   This provides for secure communications between the daemons.
 
@@ -980,4 +980,3 @@ Done: (see kernsdone for more)
 - That restoring a hard link that already exists works correctly.
   Same for soft link.
 - Make Pool resource handle Counter resources.
-
index 020817636b88066ab552d9b9da44ce37815f6d24..dd81af9e25b6b6d8755d62c4a521e3f6a1211268 100644 (file)
@@ -261,6 +261,6 @@ int do_append_data(JCR *jcr)
 
    dir_send_job_status(jcr);         /* update director */
 
-   Dmsg0(90, "return from do_append_data()\n");
+   Dmsg1(100, "return from do_append_data() stat=%d\n", ok);
    return ok ? 1 : 0;
 }
index d712b3208c771e0d3a88315e6540fb784679d8fc..c6b127862f7aa8ea6bf508d2936d5d77a1c4bbf8 100644 (file)
@@ -175,9 +175,7 @@ void *connection_request(void *arg)
         break;
       }
    }
-   if (bnet_stat != BNET_TERMINATE) {
-      bnet_sig(bs, BNET_TERMINATE);
-   }
+   bnet_sig(bs, BNET_TERMINATE);
    free_jcr(jcr);
    return NULL;
 }
index 813b43d2d43b02bab85d6c1a20bbd863ce427938..0344b771443e41a3d7020d09579b1b52777d9f14 100644 (file)
@@ -153,7 +153,6 @@ void run_job(JCR *jcr)
    set_jcr_job_status(jcr, JS_Terminated);
    bnet_fsend(dir, Job_end, jcr->Job, jcr->JobStatus, jcr->JobFiles,
       edit_uint64(jcr->JobBytes, ec1));
-
    bnet_sig(dir, BNET_EOD);          /* send EOD to Director daemon */
    return;
 }
@@ -171,9 +170,9 @@ static int append_data_cmd(JCR *jcr)
    Dmsg1(120, "Append data: %s", fd->msg);
    if (jcr->session_opened) {
       Dmsg1(110, "<bfiled: %s", fd->msg);
+      jcr->JobType = JT_BACKUP;
       if (do_append_data(jcr)) {
         bnet_fsend(fd, OK_append);
-        jcr->JobType = JT_BACKUP;
         return 1;
       } else {
         bnet_suppress_error_messages(fd, 1); /* ignore errors at this point */
@@ -195,6 +194,7 @@ static int append_end_session(JCR *jcr)
       bnet_fsend(fd, NOT_opened);
       return 0;
    }
+   set_jcr_job_status(jcr, JS_Terminated);
    return bnet_fsend(fd, OK_end);
 }
 
@@ -239,7 +239,7 @@ static int append_close_session(JCR *jcr)
    }
    /* Send final statistics to File daemon */
    bnet_fsend(fd, OK_close, jcr->JobStatus);
-   Dmsg1(160, ">filed: %s\n", fd->msg);
+   Dmsg1(120, ">filed: %s\n", fd->msg);
 
    bnet_sig(fd, BNET_EOD);           /* send EOD to File daemon */
        
index 04e7ff3a9659cece823b7b7658854b06f6980024..3a8d3a211249a8dd468f2574c90b2610cf760f4f 100644 (file)
@@ -98,22 +98,22 @@ int job_cmd(JCR *jcr)
    jcr->JobId = JobId;
    jcr->VolSessionId = newVolSessionId();
    jcr->VolSessionTime = VolSessionTime;
-   strcpy(jcr->Job, job);
+   bstrncpy(jcr->Job, job, sizeof(jcr->Job));
    unbash_spaces(job_name);
-   jcr->job_name = get_memory(strlen(job_name) + 1);
-   strcpy(jcr->job_name, job_name);
+   jcr->job_name = get_pool_memory(PM_NAME);
+   pm_strcpy(&jcr->job_name, job_name);
    unbash_spaces(client_name);
-   jcr->client_name = get_memory(strlen(client_name) + 1);
-   strcpy(jcr->client_name, client_name);
+   jcr->client_name = get_pool_memory(PM_NAME);
+   pm_strcpy(&jcr->client_name, client_name);
    unbash_spaces(fileset_name);
-   jcr->fileset_name = get_memory(strlen(fileset_name) + 1);
-   strcpy(jcr->fileset_name, fileset_name);
+   jcr->fileset_name = get_pool_memory(PM_NAME);
+   pm_strcpy(&jcr->fileset_name, fileset_name);
    jcr->JobType = JobType;
    jcr->JobLevel = level;
    jcr->no_attributes = no_attributes;
    jcr->spool_attributes = spool_attributes;
-   jcr->fileset_md5 = get_memory(strlen(fileset_md5) + 1);
-   strcpy(jcr->fileset_md5, fileset_md5);
+   jcr->fileset_md5 = get_pool_memory(PM_NAME);
+   pm_strcpy(&jcr->fileset_md5, fileset_md5);
    free_memory(job);
    free_memory(job_name);
    free_memory(client_name);