From: Kern Sibbald Date: Thu, 12 Jul 2018 09:37:24 +0000 (+0200) Subject: Add debug code for bug #2356 X-Git-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=de901692a6f4c84d6e8cebe3a5a38b711c60207f Add debug code for bug #2356 --- 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); } } }