]> 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>
Sun, 12 Dec 2010 17:03:51 +0000 (18:03 +0100)
bacula/src/stored/bls.c

index 275f681f761a4cf28d44784dd01abc90622d6b44..760808fed1598e244022895e116b0fffa8240e9c 100644 (file)
@@ -404,9 +404,12 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
          num_files++;
       }
    } else if (rec->Stream == STREAM_PLUGIN_NAME) {
-      if (strncmp("0 0", rec->data, 3) != 0) {
-         Pmsg1(000, "Plugin data: %s\n", rec->data);
-      }
+      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");
    }
       
    return true;