From de901692a6f4c84d6e8cebe3a5a38b711c60207f Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 12 Jul 2018 11:37:24 +0200 Subject: [PATCH] Add debug code for bug #2356 --- bacula/src/dird/catreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/catreq.c b/bacula/src/dird/catreq.c index 9c9d1f3d84..88ddd47296 100644 --- a/bacula/src/dird/catreq.c +++ b/bacula/src/dird/catreq.c @@ -657,11 +657,14 @@ static void update_attribute(JCR *jcr, char *msg, int32_t msglen) db_strerror(jcr->db)); } jcr->cached_attribute = false; - } else { + } else if (ar->FileId != 0) { if (!db_add_digest_to_file_record(jcr, jcr->db, ar->FileId, digestbuf, type)) { Jmsg(jcr, M_ERROR, 0, _("Catalog error updating file digest. %s"), db_strerror(jcr->db)); } + } else { /* Something is wrong FileId == 0 */ + Jmsg(jcr, M_WARNING, 0, "Illegal FileId in update attribute: FileId=0 Stream=%d fname=%s\n", + ar->Stream, ar->fname); } } } -- 2.39.5