From: Kern Sibbald Date: Sun, 29 Mar 2009 13:43:23 +0000 (+0000) Subject: More sanity checking X-Git-Tag: Release-7.0.0~3213 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d04a65c25fe3dc8e5f122fdf0d3896c61d94b34c;p=bacula%2Fbacula More sanity checking git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8642 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index 82e71a4785..c3de1c6e90 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -270,6 +270,7 @@ int DirComm::read() int stat = 0; while (m_sock) { for (;;) { + if (!m_sock) break; stat = m_sock->wait_data_intr(0, 50000); if (stat > 0) { break; @@ -280,6 +281,9 @@ int DirComm::read() m_console->messagesPending(false); } } + if (!m_sock) { + return BNET_HARDEOF; + } m_sock->msg[0] = 0; stat = sock_read(); if (stat >= 0) {