/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, September MM
*
- * Version $Id$
*/
#include "bacula.h"
bail_out:
if (jcr->file_bsock) {
- bnet_sig(jcr->file_bsock, BNET_TERMINATE);
- bnet_close(jcr->file_bsock);
+ jcr->file_bsock->signal(BNET_TERMINATE);
+ jcr->file_bsock->close();
jcr->file_bsock = NULL;
}
return 1;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, October MMI
*
- * Version $Id$
*/
#include "bacula.h"
if (!sock || ua->batch) { /* No UA or batch mode */
return 0;
}
- if (!subprompt) {
+ if (!subprompt && ua->api) {
sock->signal(BNET_TEXT_INPUT);
}
sock->fsend("%s", prompt);
- if (subprompt) {
+ if (!ua->api || subprompt) {
sock->signal(BNET_SUB_PROMPT);
}
for ( ;; ) {