See email of 21Aug2007 for details.
Priority:
+- KIWI
+- Implement wait on multiple objects
+ - Multiple max times
+ - pthread signal
+ - socket input ready
- Implement SDErrors (must return from SD)
- Implement USB keyboard support in rescue CD.
+- Implement continue spooling while despooling.
- Remove all install temp files in Win32 PLUGINSDIR.
- Audit retention periods to make sure everything is 64 bit.
- Use E'xxx' to escape PostgreSQL strings.
* the escaped output.
*/
void
-db_escape_string(JCR *jcr, B_DB *db, char *snew, char *old, int len)
+db_escape_string(JCR *jcr, B_DB *mdb, char *snew, char *old, int len)
{
- mysql_real_escape_string(jcr->db, snew, old, len);
+ mysql_real_escape_string(mdb->db, snew, old, len);
}
/*
set_jcr_job_status(jcr, JS_WaitFD);
if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
- cancel_storage_daemon_job(jcr);
goto bail_out;
}
set_jcr_job_status(jcr, JS_ErrorTerminated);
Dmsg1(400, "wait for sd. use=%d\n", jcr->use_count());
/* Cancel SD */
- if (jcr->store_bsock) {
- jcr->store_bsock->fsend("cancel Job=%s\n", jcr->Job);
- }
+ cancel_storage_daemon_job(jcr);
wait_for_storage_daemon_termination(jcr);
Dmsg1(400, "after wait for sd. use=%d\n", jcr->use_count());
return false;
}
bnet_sig(fd, BNET_TERMINATE); /* tell Client we are terminating */
+ /* Force cancel in SD if failing */
+ if (job_canceled(jcr) || !fd_ok) {
+ cancel_storage_daemon_job(jcr);
+ }
+
/* Note, the SD stores in jcr->JobFiles/ReadBytes/JobBytes/Errors */
wait_for_storage_daemon_termination(jcr);
*/
set_jcr_job_status(jcr, JS_WaitFD);
if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
- cancel_storage_daemon_job(jcr);
restore_cleanup(jcr, JS_ErrorTerminated);
return false;
}
jcr->unlink_bsr = false;
}
+ if (job_canceled(jcr)) {
+ cancel_storage_daemon_job(jcr);
+ }
+
switch (TermCode) {
case JS_Terminated:
if (jcr->ExpectedFiles > jcr->jr.JobFiles) {
*/
set_jcr_job_status(jcr, JS_Blocked);
if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
- cancel_storage_daemon_job(jcr);
- return false;
+ goto bail_out;
}
set_jcr_job_status(jcr, JS_Running);
Dmsg0(30, ">filed: Send include list\n");
if (!send_include_list(jcr)) {
- return false;
+ goto bail_out;
}
Dmsg0(30, ">filed: Send exclude list\n");
if (!send_exclude_list(jcr)) {
- return false;
+ goto bail_out;
}
/*
}
bnet_fsend(fd, storaddr, jcr->rstore->address, jcr->rstore->SDDport);
if (!response(jcr, fd, OKstore, "Storage", DISPLAY_ERROR)) {
- return false;
+ goto bail_out;
}
/*
*/
if (!send_bootstrap_file(jcr, fd) ||
!response(jcr, fd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
- return false;
+ goto bail_out;
}
if (!jcr->RestoreBootstrap) {
Jmsg0(jcr, M_FATAL, 0, _("Deprecated feature ... use bootstrap.\n"));
- return false;
+ goto bail_out;
}
level = "volume";
default:
Jmsg2(jcr, M_FATAL, 0, _("Unimplemented Verify level %d(%c)\n"), jcr->JobLevel,
jcr->JobLevel);
- return false;
+ goto bail_out;
}
if (!send_runscripts_commands(jcr)) {
- return false;
+ goto bail_out;
}
/*
* Send verify command/level to File daemon
*/
- bnet_fsend(fd, verifycmd, level);
+ fd->fsend(verifycmd, level);
if (!response(jcr, fd, OKverify, "Verify", DISPLAY_ERROR)) {
- return false;
+ goto bail_out;
}
/*
default:
Jmsg1(jcr, M_FATAL, 0, _("Unimplemented verify level %d\n"), jcr->JobLevel);
- return false;
+ goto bail_out;
}
stat = wait_for_job_termination(jcr);
verify_cleanup(jcr, stat);
return true;
}
+
+bail_out:
+ verify_cleanup(jcr, JS_ErrorTerminated);
return false;
}
update_job_end(jcr, TermCode);
+ if (job_canceled(jcr)) {
+ cancel_storage_daemon_job(jcr);
+ }
+
if (jcr->unlink_bsr && jcr->RestoreBootstrap) {
unlink(jcr->RestoreBootstrap);
jcr->unlink_bsr = false;
Technical notes on version 2.3
General:
+13Sep07
+kes Cancel storage daemon in all cases where FD reports error. This
+ should fix virtually all cases of bug #920.
+kes Fix db_escape_string() for MySQL which did not compile.
12Sep07
kes Fix error message that was clobbered when Dir tells SD it does not
have write permission on Volume. This should fix a minor point