]> git.sur5r.net Git - bacula/bacula/commitdiff
Print plugin end records in bls
authorKern Sibbald <kern@sibbald.com>
Sun, 12 Dec 2010 16:58:35 +0000 (17:58 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:43 +0000 (14:39 +0200)
bacula/src/stored/bls.c

index 1406a845ee75f9738e139c7519b2ca8b2c7d198b..e9758c0e46eb355d4fc2d677e7050b8f36bb9a4c 100644 (file)
@@ -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");
    }