From: Kern Sibbald Date: Tue, 13 Apr 2004 12:50:27 +0000 (+0000) Subject: Add wx-console directory X-Git-Tag: Release-7.0.0~9565 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=108f4ef89086484542f98f62dcb7d8c3be29070f;p=bacula%2Fbacula Add wx-console directory git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1194 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 291a24af30..f6ce8e0905 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,8 +1,16 @@ - Release Notes for Bacula 1.34.0 + Release Notes for Bacula 1.34.1 Bacula code: Total files = 306 Total lines = 91,131 (*.h *.c *.in) +Changes for 1.34.1: +- Autochanger users, please note you must add %d to the end of the + changer command line in your Device resource in your bacula-sd.conf + file. +- Fixed a crash in the query command. +- Removed the schedule from the default restore job. + +Release 1.34.0 Major Features: - Data spooling which reduces tape shoe-shine during Inc backups, and permits multiple simultaneous backups without interleaved blocks. diff --git a/bacula/src/console/authenticate.c b/bacula/src/console/authenticate.c index 5f5be7bfca..0970447649 100644 --- a/bacula/src/console/authenticate.c +++ b/bacula/src/console/authenticate.c @@ -11,7 +11,7 @@ * */ /* - Copyright (C) 2000, 2001 Kern Sibbald and John Walker + Copyright (C) 2001-2004 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -23,9 +23,10 @@ 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 - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. */ #include "bacula.h" diff --git a/bacula/src/dird/bacula-dir.conf.in b/bacula/src/dird/bacula-dir.conf.in index f150794933..25e719882b 100644 --- a/bacula/src/dird/bacula-dir.conf.in +++ b/bacula/src/dird/bacula-dir.conf.in @@ -68,6 +68,7 @@ Job { Client=@hostname@-fd FileSet="Full Set" Storage = File + Pool = Default Messages = Standard Where = /tmp/bacula-restores } diff --git a/bacula/src/dird/ua_query.c b/bacula/src/dird/ua_query.c index 970ef5ab52..32f2114266 100644 --- a/bacula/src/dird/ua_query.c +++ b/bacula/src/dird/ua_query.c @@ -32,8 +32,8 @@ extern DIRRES *director; -static char *substitute_prompts(UAContext *ua, - char *query, char **prompt, int nprompt); +static POOLMEM *substitute_prompts(UAContext *ua, + POOLMEM *query, char **prompt, int nprompt); /* * Read a file containing SQL queries and prompt @@ -50,23 +50,21 @@ static char *substitute_prompts(UAContext *ua, */ int querycmd(UAContext *ua, char *cmd) { - FILE *fd; + FILE *fd = NULL; POOLMEM *query = get_pool_memory(PM_MESSAGE); char line[1000]; int i, item, len; char *prompt[9]; - int nprompt; + int nprompt = 0;; char *query_file = director->query_file; if (!open_db(ua)) { - free_pool_memory(query); - return 1; + goto bail_out; } if ((fd=fopen(query_file, "r")) == NULL) { bsendmsg(ua, "Could not open %s: ERR=%s\n", query_file, strerror(errno)); - free_pool_memory(query); - return 1; + goto bail_out; } start_prompt(ua, _("Available queries:\n")); @@ -77,9 +75,7 @@ int querycmd(UAContext *ua, char *cmd) } } if ((item=do_prompt(ua, "", _("Choose a query"), NULL, 0)) < 0) { - fclose(fd); - free_pool_memory(query); - return 1; + goto bail_out; } rewind(fd); i = -1; @@ -93,15 +89,12 @@ int querycmd(UAContext *ua, char *cmd) } if (i != item) { bsendmsg(ua, _("Could not find query.\n")); - fclose(fd); - free_pool_memory(query); - return 1; + goto bail_out; } query[0] = 0; for (i=0; i<9; i++) { prompt[i] = NULL; } - nprompt = 0; while (fgets(line, sizeof(line), fd) != NULL) { if (line[0] == '#') { continue; @@ -121,11 +114,10 @@ int querycmd(UAContext *ua, char *cmd) continue; } } - query = check_pool_memory_size(query, len + 1); if (*query != 0) { - strcat(query, " "); + pm_strcat(&query, " "); } - strcat(query, line); + pm_strcat(&query, line); if (line[len-1] != ';') { continue; } @@ -151,6 +143,11 @@ int querycmd(UAContext *ua, char *cmd) bsendmsg(ua, "%s\n", query); } } + +bail_out: + if (fd) { + fclose(fd); + } free_pool_memory(query); for (i=0; idcr->spool_size = 0; V(mutex); make_unique_data_spool_filename(jcr, &name); @@ -185,18 +186,22 @@ static bool despool_data(DCR *dcr) dcr->spooling = false; lock_device(dcr->dev); dcr->dev_locked = true; - /* Set up a dev structure to read */ + + /* Setup a dev structure to read */ rdev = (DEVICE *)malloc(sizeof(DEVICE)); memset(rdev, 0, sizeof(DEVICE)); rdev->dev_name = get_memory(strlen("spool")+1); strcpy(rdev->dev_name, "spool"); rdev->errmsg = get_pool_memory(PM_EMSG); *rdev->errmsg = 0; + rdev->max_block_size = dcr->dev->max_block_size; + rdev->min_block_size = dcr->dev->min_block_size; rdev->device = dcr->dev->device; rdcr = new_dcr(NULL, rdev); rdcr->spool_fd = dcr->spool_fd; rdcr->jcr = jcr; /* set a valid jcr */ block = rdcr->block; + Dmsg1(800, "read/write block size = %d\n", block->buf_len); lseek(rdcr->spool_fd, 0, SEEK_SET); /* rewind */ for ( ; ok; ) {