]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bls.c
Add %D option to edit_job_code, simplify callbacks on director side
[bacula/bacula] / bacula / src / stored / bls.c
index 1406a845ee75f9738e139c7519b2ca8b2c7d198b..a7c396e5741a0b68733f3ea7210f27d8b991f255 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2011 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.
@@ -391,7 +391,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
          return true;
       }
 
-      attr->data_stream = decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
+      attr->data_stream = decode_stat(attr->attr, &attr->statp, sizeof(attr->statp), &attr->LinkFI);
       build_attr_output_fnames(jcr, attr);
 
       if (file_is_included(ff, attr->fname) && !file_is_excluded(ff, attr->fname)) {
@@ -402,11 +402,12 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
          print_ls_output(jcr, attr);
          num_files++;
       }
-   } else if (rec->maskedStream == STREAM_PLUGIN_NAME) {
-      if (strncmp("0 0", rec->data, 3) != 0) {
-         Pmsg1(000, "Plugin data: %s\n", rec->data);
-      }
-   } else if (rec->maskedStream == STREAM_RESTORE_OBJECT) {
+   } else if (rec->Stream == STREAM_PLUGIN_NAME) {
+      char data[100];
+      int len = MIN(rec->data_len+1, sizeof(data));
+      bstrncpy(data, rec->data, len);
+      Pmsg1(000, "Plugin data: %s\n", data);
+   } else if (rec->Stream == STREAM_RESTORE_OBJECT) {
       Pmsg0(000, "Restore Object record\n");
    }