From: Kern Sibbald Date: Wed, 9 Jun 2004 11:52:24 +0000 (+0000) Subject: Final changes X-Git-Tag: Release-1.34.3~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1255bcf7f2e7b890ed337f986280cfca7b78741b;p=bacula%2Fbacula Final changes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1400 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index cae0d5befa..83d5c6d225 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,5 +1,24 @@ -2004-06-xx Version 1.34.3 xxJun04 Release +2004-06-09 Version 1.34.3 09Jun04 Release +09Jun04 +- Add missing FT codes in new FileSet callback, which caused error + return on unchanged directories. +08Jun04 +- Fix "update volumes" move from one pool to another. +- Change default search location for PostgreSQL -- thanks + to Hans-Ulrich Schaefer. +06Jun04 +- Zero Slot if not autochanger in stored/mount.c +- As a last ditch effort to mount the next tape in mount.c, zero slot + and ask sysop. +- Win32 status was picking up the first status in the list job terminated + jobs instead of the last. +05Jun04 +- Add additional fields to llist pools +- Correct some minor label scan problems with update slots +- Ensure correct Pool is used with tape cleaning prefixes. +- Eliminate false error message in update slots (slots taken as + Storage device). 02Jun04 - Print "Unimplemented" message if user does reload command in Console. - Add DISTINCT to Volumes for restore in query message (user supplied fix). diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 48522ab9d4..a7b47c8492 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,5 +1,5 @@ - Release Notes for Bacula 1.34.2 + Release Notes for Bacula 1.34.3 Bacula code: Total files = 364 Total lines = 102,925 (*.h *.c *.in) diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 0e7a69627d..8571be775e 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -66,6 +66,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr) } if (!bnet_set_buffer_size(sd, buf_size, BNET_SETBUF_WRITE)) { set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg(jcr, M_FATAL, 0, _("Cannot set buffer size FD->SD.\n")); return 0; } @@ -89,6 +90,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr) if (!find_files(jcr, (FF_PKT *)jcr->ff, save_file, (void *)jcr)) { stat = 0; /* error */ set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg(jcr, M_FATAL, 0, _("Find files error.\n")); } stop_heartbeat_monitor(jcr); @@ -113,6 +115,10 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr) * *****FIXME***** add FSMs File System Modules * * Send the file and its data to the Storage daemon. + * + * Returns: 1 if OK + * 0 if error + * -1 to ignore file/directory (not used here) */ static int save_file(FF_PKT *ff_pkt, void *vjcr) { @@ -296,6 +302,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr) bclose(&ff_pkt->bfd); } set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n")); return 0; } bnet_sig(sd, BNET_EOD); /* indicate end of attributes data */ @@ -340,6 +347,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr) if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, data_stream)) { bclose(&ff_pkt->bfd); set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n")); return 0; } Dmsg1(300, ">stored: datahdr %s\n", sd->msg); @@ -432,6 +440,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr) sd->msglen = 0; bclose(&ff_pkt->bfd); set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n")); return 0; } } @@ -451,6 +460,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr) bclose(&ff_pkt->bfd); /* close file */ if (!bnet_sig(sd, BNET_EOD)) { /* indicate end of file data */ set_jcr_job_status(jcr, JS_ErrorTerminated); + Jmsg0(jcr, M_FATAL, 0, _("Network send error.\n")); return 0; } } diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index e08f11d4f6..f29491699f 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -161,7 +161,8 @@ static char read_close[] = "read close session %d\n"; */ void *handle_client_request(void *dirp) { - int i, found, quit; + int i; + bool found, quit; JCR *jcr; BSOCK *dir = (BSOCK *)dirp; @@ -178,7 +179,7 @@ void *handle_client_request(void *dirp) /**********FIXME******* add command handler error code */ - for (quit=0; !quit;) { + for (quit=false; !quit;) { /* Read command */ if (bnet_recv(dir) < 0) { @@ -186,24 +187,25 @@ void *handle_client_request(void *dirp) } dir->msg[dir->msglen] = 0; Dmsg1(100, "msg); - found = FALSE; + found = false; for (i=0; cmds[i].cmd; i++) { if (strncmp(cmds[i].cmd, dir->msg, strlen(cmds[i].cmd)) == 0) { if (!jcr->authenticated && cmds[i].func != hello_cmd) { bnet_fsend(dir, no_auth); break; } - found = TRUE; /* indicate command found */ + found = true; /* indicate command found */ + Dmsg1(100, "Executing %s command.\n", cmds[i].cmd); if (!cmds[i].func(jcr)) { /* do command */ - quit = TRUE; /* error or fully terminated, get out */ - Dmsg0(20, "Command error or Job done.\n"); + quit = true; /* error or fully terminated, get out */ + Dmsg0(20, "Quit command loop due to command error or Job done.\n"); } break; } } if (!found) { /* command not found */ bnet_fsend(dir, errmsg); - quit = TRUE; + quit = true; break; } } @@ -960,7 +962,7 @@ static int level_cmd(JCR *jcr) his_time = str_to_uint64(buf); rt = get_current_btime() - bt_start; /* compute round trip time */ bt_adj -= his_time - bt_start - rt/2; - Dmsg2(100, "rt=%s adj=%s\n", edit_uint64(rt, ed1), edit_uint64(bt_adj, ed2)); + Dmsg2(200, "rt=%s adj=%s\n", edit_uint64(rt, ed1), edit_uint64(bt_adj, ed2)); } bt_adj = bt_adj / 8; /* compute average time */ @@ -1122,6 +1124,7 @@ static int backup_cmd(JCR *jcr) if (!blast_data_to_storage_daemon(jcr, NULL)) { set_jcr_job_status(jcr, JS_ErrorTerminated); bnet_suppress_error_messages(sd, 1); + Dmsg0(110, "Error in blast_data.\n"); } else { set_jcr_job_status(jcr, JS_Terminated); if (jcr->JobStatus != JS_Terminated) { @@ -1167,10 +1170,10 @@ static int backup_cmd(JCR *jcr) } cleanup: - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles, edit_uint64(jcr->ReadBytes, ed1), edit_uint64(jcr->JobBytes, ed2), jcr->Errors); + Dmsg1(110, "End FD msg: %s\n", dir->msg); return 0; /* return and stop command loop */ } diff --git a/bacula/src/filed/verify.c b/bacula/src/filed/verify.c index 7f919e039a..aa75e463fe 100644 --- a/bacula/src/filed/verify.c +++ b/bacula/src/filed/verify.c @@ -205,7 +205,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt) char MD5buf[40]; /* 24 should do */ MD5Init(&md5c); while ((n=bread(&bfd, jcr->big_buf, jcr->buf_size)) > 0) { - MD5Update(&md5c, ((unsigned char *) jcr->big_buf), n); + MD5Update(&md5c, ((unsigned char *)jcr->big_buf), (int)n); jcr->JobBytes += n; jcr->ReadBytes += n; } @@ -225,7 +225,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt) char SHA1buf[40]; /* 24 should do */ SHA1Init(&sha1c); while ((n=bread(&bfd, jcr->big_buf, jcr->buf_size)) > 0) { - SHA1Update(&sha1c, ((unsigned char *) jcr->big_buf), n); + SHA1Update(&sha1c, ((unsigned char *)jcr->big_buf), (int)n); jcr->JobBytes += n; jcr->ReadBytes += n; } diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index d9ec87cd39..b74f90c2d4 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -129,7 +129,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void for (j=0; jname_list.size(); j++) { Dmsg1(400, "F %s\n", (char *)incexe->name_list.get(j)); char *fname = (char *)incexe->name_list.get(j); - if (!find_one_file(jcr, ff, our_callback, his_pkt, fname, (dev_t)-1, 1)) { + if (find_one_file(jcr, ff, our_callback, his_pkt, fname, (dev_t)-1, 1) == 0) { return 0; /* error return */ } } @@ -143,7 +143,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void bstrncpy(ff->VerifyOpts, inc->VerifyOpts, sizeof(ff->VerifyOpts)); Dmsg1(50, "find_files: file=%s\n", inc->fname); if (!file_is_excluded(ff, inc->fname)) { - if (!find_one_file(jcr, ff, callback, his_pkt, inc->fname, (dev_t)-1, 1)) { + if (find_one_file(jcr, ff, callback, his_pkt, inc->fname, (dev_t)-1, 1) ==0) { return 0; /* error return */ } } @@ -205,6 +205,7 @@ static int our_callback(FF_PKT *ff, void *hpkt) case FT_NOFOLLOW: case FT_NOSTAT: case FT_NOCHG: + case FT_DIRNOCHG: case FT_ISARCH: case FT_NORECURSE: case FT_NOFSCHG: @@ -218,14 +219,20 @@ static int our_callback(FF_PKT *ff, void *hpkt) case FT_LNK: case FT_DIRBEGIN: case FT_DIREND: + case FT_RAW: + case FT_FIFO: case FT_SPEC: if (accept_file(ff)) { return ff->callback(ff, hpkt); } else { - return 0; + Dmsg1(100, "Skip file %s\n", ff->fname); + return -1; /* ignore this file */ } - } - return 0; + + default: + Dmsg1(000, "Unknown FT code %d\n", ff->type); + return 0; + } } diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index 1ffee61095..15ff905d19 100755 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -258,9 +258,10 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), * do not immediately save it, but do so only after everything * in the directory is seen (i.e. the FT_DIREND). */ - if (!handle_file(ff_pkt, pkt)) { + rtn_stat = handle_file(ff_pkt, pkt); + if (rtn_stat < 1) { /* ignore or error status */ free(link); - return 0; /* Do not save this directory */ + return rtn_stat; } /* Done with DIRBEGIN, next call will be DIREND */ if (ff_pkt->type == FT_DIRBEGIN) { diff --git a/bacula/src/version.h b/bacula/src/version.h index 8984448c11..cc881883c5 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.34.3" #define VSTRING "1" -#define BDATE "08 June 2004" -#define LSMDATE "08Jun04" +#define BDATE "09 June 2004" +#define LSMDATE "09Jun04" /* Debug flags */ #undef DEBUG