From: Kern Sibbald Date: Wed, 4 Nov 2009 09:15:59 +0000 (+0100) Subject: Fix double send of attributes introduced in 84aabba7cee82f0c1f6dae8882a2ee0bb26306ca X-Git-Tag: Release-7.0.0~2597^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8d1e5218ab7c53b7a31736bea0dafc5480170831;p=bacula%2Fbacula Fix double send of attributes introduced in 84aabba7cee82f0c1f6dae8882a2ee0bb26306ca --- diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index d35da86409..a2e3bb275c 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -577,11 +577,11 @@ bool BSOCK::despool(void update_attr_spool_size(ssize_t size), ssize_t tsize) size += sizeof(int32_t); msglen = ntohl(pktsiz); if (msglen > 0) { - if (msglen > (int32_t) sizeof_pool_memory(msg)) { + if (msglen > (int32_t)sizeof_pool_memory(msg)) { msg = realloc_pool_memory(msg, msglen + 1); } nbytes = fread(msg, 1, msglen, m_spool_fd); - if (nbytes != (size_t) msglen) { + if (nbytes != (size_t)msglen) { berrno be; Dmsg2(400, "nbytes=%d msglen=%d\n", nbytes, msglen); Qmsg1(get_jcr(), M_FATAL, 0, _("fread attr spool error. ERR=%s\n"), @@ -599,13 +599,10 @@ bool BSOCK::despool(void update_attr_spool_size(ssize_t size), ssize_t tsize) if (jcr && job_canceled(jcr)) { return false; } - send(); } update_attr_spool_size(tsize - last); if (ferror(m_spool_fd)) { - berrno be; - Qmsg1(jcr, M_FATAL, 0, _("fread attr spool error. ERR=%s\n"), - be.bstrerror()); + Qmsg(jcr, M_FATAL, 0, _("fread attr spool I/O error.\n")); return false; } return true;