From: Kern Sibbald Date: Sun, 12 Dec 2010 16:58:35 +0000 (+0100) Subject: Print plugin end records in bls X-Git-Tag: Release-7.0.0~1288 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=12b98b83e0a4d006b9ffc5053f5ebcda5dc856ec;p=bacula%2Fbacula Print plugin end records in bls --- diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index 1406a845ee..e9758c0e46 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -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"); }