*
*/
/*
- Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+ Copyright (C) 2000-2003 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 as
};
/* Commands from the File daemon that require additional scanning */
-static char read_open[] = "read open session = %s %ld %ld %ld %ld %ld %ld\n";
+static char read_open[] = "read open session = %127s %ld %ld %ld %ld %ld %ld\n";
/* Responses sent to the File daemon */
static char NO_open[] = "3901 Error session already open\n";
bnet_fsend(dir, Job_start, jcr->Job);
jcr->start_time = time(NULL);
jcr->run_time = jcr->start_time;
- jcr->JobStatus = JS_Running;
+ set_jcr_job_status(jcr, JS_Running);
dir_send_job_status(jcr); /* update director */
for (quit=0; !quit;) {
int stat;
if (strncmp(fd_cmds[i].cmd, fd->msg, strlen(fd_cmds[i].cmd)) == 0) {
found = 1; /* indicate command found */
if (!fd_cmds[i].func(jcr)) { /* do command */
- jcr->JobStatus = JS_ErrorTerminated;
+ set_jcr_job_status(jcr, JS_ErrorTerminated);
quit = 1;
}
break;
}
bnet_sig(fd, BNET_TERMINATE); /* signal to FD job is done */
jcr->end_time = time(NULL);
- if (!job_cancelled(jcr)) {
- jcr->JobStatus = JS_Terminated;
- }
+ set_jcr_job_status(jcr, JS_Terminated);
bnet_fsend(dir, Job_end, jcr->Job, jcr->JobStatus, jcr->JobFiles,
edit_uint64(jcr->JobBytes, ec1));
jcr->JobType = JT_BACKUP;
return 1;
} else {
+ bnet_suppress_error_messages(fd, 1); /* ignore errors at this point */
bnet_fsend(fd, ERROR_append);
return 0;
}
bnet_fsend(fd, NOT_opened);
return 0;
}
- if (jcr->JobStatus != JS_ErrorTerminated) {
- jcr->JobStatus = JS_Terminated;
- }
/* Send final statistics to File daemon */
bnet_fsend(fd, OK_close, jcr->JobStatus);
Dmsg1(160, ">filed: %s\n", fd->msg);