From: Kern Sibbald Date: Sun, 29 Mar 2009 13:43:23 +0000 (+0000) Subject: More sanity checking X-Git-Tag: Release-3.0.0~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fe0717421a74c8a93cb66edf2fa87b8e491908e4;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) {