]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/askdir.c
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / bacula / src / stored / askdir.c
index 9b492c22e4c3ca4fb1c5803f14068753b51198c7..5f17c78b8a48e74f1eebd42cfca040633275131e 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.
@@ -330,7 +330,7 @@ bool dir_update_volume_info(DCR *dcr, bool label, bool update_LastWritten)
    POOL_MEM VolumeName;
 
    /* If system job, do not update catalog */
-   if (jcr->get_JobType() == JT_SYSTEM) {
+   if (jcr->getJobType() == JT_SYSTEM) {
       return true;
    }
 
@@ -380,6 +380,8 @@ bool dir_update_volume_info(DCR *dcr, bool label, bool update_LastWritten)
    ok = true;
 
 bail_out:
+   /* ***FIXME*** remove for production */
+   sm_check(__FILE__, __LINE__, true);
    V(vol_info_mutex);
    return ok;
 }
@@ -394,14 +396,14 @@ bool dir_create_jobmedia_record(DCR *dcr, bool zero)
    char ed1[50];
 
    /* If system job, do not update catalog */
-   if (jcr->get_JobType() == JT_SYSTEM) {
+   if (jcr->getJobType() == JT_SYSTEM) {
       return true;
    }
 
    /* Throw out records where FI is zero -- i.e. nothing done */
    if (!zero && dcr->VolFirstIndex == 0 && 
         (dcr->StartBlock != 0 || dcr->EndBlock != 0)) {
-      Dmsg0(000, "JobMedia problem FI=0 StartBlock!=0\n");
+      Dmsg0(100, "JobMedia FI=0 StartBlock!=0 record suppressed\n");
       return true;
    }
 
@@ -465,6 +467,10 @@ bool dir_update_file_attributes(DCR *dcr, DEV_RECORD *rec)
    ser_bytes(rec->data, rec->data_len);
    dir->msglen = ser_length(dir->msg);
    Dmsg1(1800, ">dird %s\n", dir->msg);    /* Attributes */
+   if (rec->Stream == STREAM_UNIX_ATTRIBUTES || 
+       rec->Stream == STREAM_UNIX_ATTRIBUTES_EX) {
+      dir->set_data_end();                 /* set offset of last valid data */
+   }
    return dir->send();
 }
 
@@ -494,6 +500,9 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr)
    JCR *jcr = dcr->jcr;
    bool got_vol = false;
 
+   if (job_canceled(jcr)) {
+      return false;
+   }
    Dmsg0(400, "enter dir_ask_sysop_to_create_appendable_volume\n");
    ASSERT(dev->blocked());
    for ( ;; ) {
@@ -510,8 +519,8 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr)
       } else {
          if (stat == W_TIMEOUT || stat == W_MOUNT) {
             Mmsg(dev->errmsg, _(
-"Job %s waiting. Cannot find any appendable volumes.\n"
-"Please use the \"label\"  command to create a new Volume for:\n"
+"Job %s is waiting. Cannot find any appendable volumes.\n"
+"Please use the \"label\" command to create a new Volume for:\n"
 "    Storage:      %s\n"
 "    Pool:         %s\n"
 "    Media type:   %s\n"),