-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).
- 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)
}
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;
}
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);
* *****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)
{
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 */
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);
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;
}
}
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;
}
}
*/
void *handle_client_request(void *dirp)
{
- int i, found, quit;
+ int i;
+ bool found, quit;
JCR *jcr;
BSOCK *dir = (BSOCK *)dirp;
/**********FIXME******* add command handler error code */
- for (quit=0; !quit;) {
+ for (quit=false; !quit;) {
/* Read command */
if (bnet_recv(dir) < 0) {
}
dir->msg[dir->msglen] = 0;
Dmsg1(100, "<dird: %s", dir->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;
}
}
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 */
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) {
}
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 */
}
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;
}
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;
}
for (j=0; j<incexe->name_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 */
}
}
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 */
}
}
case FT_NOFOLLOW:
case FT_NOSTAT:
case FT_NOCHG:
+ case FT_DIRNOCHG:
case FT_ISARCH:
case FT_NORECURSE:
case FT_NOFSCHG:
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;
+ }
}
* 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) {
#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