The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
- modify it under the terms of version two of the GNU General Public
+ modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
{
int conn;
+ /* Do not poll if notifier off */
+ if (!mainWin->m_notify) {
+ return;
+ }
+
/*
* Note if we call getDirComm here, we continuously consume
* file descriptors.
{
int conn;
if (!getDirComm(conn)) {
- if (mainWin->m_connDebug) {
- Pmsg0(000, "call newDirComm\n");
- }
+ if (mainWin->m_connDebug) Pmsg0(000, "call newDirComm\n");
if (!newDirComm(conn)) {
Emsg1(M_ABORT, 0, "Failed to connect to %s for populateLists.\n", m_dir->name());
return;
mainWin->waitEnter();
DirComm *dircomm = m_dircommHash.value(conn);
int stat;
+ bool prev_notify = mainWin->m_notify;
if (mainWin->m_connDebug) {
QString dbgmsg = QString("dir_cmd conn %1 %2 %3\n").arg(conn).arg(m_dir->name()).arg(cmd);
results << dircomm->msg();
}
if (stat > 0 && mainWin->m_displayAll) display_text(dircomm->msg());
- notify(conn, true);
+ if (prev_notify) {
+ notify(conn, true); /* turn it back on */
+ }
discardToPrompt(conn);
mainWin->waitExit();
- return true; /* ***FIXME*** return any command error */
+ return true; /* ***FIXME*** return any command error */
}
/*
DirComm *dircomm = m_dircommHash.value(conn);
int stat;
POOL_MEM cmd(PM_MESSAGE);
+ bool prev_notify = mainWin->m_notify;
if (!is_connectedGui()) {
return false;
}
- if (mainWin->m_connDebug)
- Pmsg2(000, "sql_cmd conn %i %s\n", conn, query);
- if (donotify)
+ if (mainWin->m_connDebug) Pmsg2(000, "sql_cmd conn %i %s\n", conn, query);
+ if (donotify) {
dircomm->notify(false);
+ }
mainWin->waitEnter();
pm_strcpy(cmd, ".sql query=\"");
QString dum = dircomm->msg();
if ((dum.left(6) == "*None*")) doappend = false;
}
- if (doappend)
+ if (doappend) {
results << dircomm->msg();
+ }
first = false;
}
- if (donotify)
+ if (donotify && prev_notify) {
dircomm->notify(true);
+ }
discardToPrompt(conn);
mainWin->waitExit();
- return true; /* ***FIXME*** return any command error */
+ return !mainWin->isClosing(); /* return false if closing */
}
/*
QString scmd;
int stat;
char *def;
+ bool prev_notify = mainWin->m_notify;
+ bool rtn = false;
- if (donotify)
+ if (donotify) {
conn = notifyOff();
+ }
beginNewCommand(conn);
DirComm *dircomm = m_dircommHash.value(conn);
bool prevWaitState = mainWin->getWaitState();
continue;
}
}
-
- if (donotify)
- notify(conn, true);
- if (!prevWaitState)
- mainWin->waitExit();
- return true;
-
+ rtn = true;
+ /* Fall through wanted */
bail_out:
- if (donotify)
+ if (donotify && prev_notify) {
notify(conn, true);
- if (!prevWaitState)
+ }
+ if (!prevWaitState) {
mainWin->waitExit();
- return false;
+ }
+ return rtn;
}
int stat = 0;
text = "";
+ dircomm->read();
+ text += dircomm->msg();
if (mainWin->m_commDebug) Pmsg1(000, "returnFromPrompt %s\n", m_dir->name());
while (!dircomm->m_at_prompt) {
if ((stat=dircomm->read()) > 0) {
if (findDirComm(conn)) {
return true;
}
- if (mainWin->m_connDebug) {
- Pmsg0(000, "call newDirComm\n");
- }
+ if (mainWin->m_connDebug) Pmsg0(000, "call newDirComm\n");
return newDirComm(conn);
}