/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
unbash_spaces(fileset_name);
jcr->fileset_name = get_pool_memory(PM_NAME);
pm_strcpy(jcr->fileset_name, fileset_name);
- jcr->JobType = JobType;
- jcr->JobLevel = level;
+ jcr->set_JobType(JobType);
+ jcr->set_JobLevel(level);
jcr->no_attributes = no_attributes;
jcr->spool_attributes = spool_attributes;
jcr->spool_data = spool_data;
jcr->PreferMountedVols = PreferMountedVols;
jcr->authenticated = false;
- jcr->need_fd = true;
/*
* Pass back an authorization key for the File daemon
bsnprintf(seed, sizeof(seed), "%p%d", jcr, JobId);
make_session_key(auth_key, seed, 1);
dir->fsend(OKjob, jcr->VolSessionId, jcr->VolSessionTime, auth_key);
- Dmsg2(100, ">dird jid=%u: %s", (uint32_t)jcr->JobId, dir->msg);
+ Dmsg2(50, ">dird jid=%u: %s", (uint32_t)jcr->JobId, dir->msg);
jcr->sd_auth_key = bstrdup(auth_key);
memset(auth_key, 0, sizeof(auth_key));
generate_daemon_event(jcr, "JobStart");
/* If we do not need the FD, we are doing a migrate, copy, or virtual
* backup.
*/
- if (!jcr->need_fd) {
+ if (jcr->no_client_used()) {
do_mac(jcr);
return false;
}
timeout.tv_nsec = tv.tv_usec * 1000;
timeout.tv_sec = tv.tv_sec + me->client_wait;
- Dmsg3(050, "%s waiting %d sec for FD to contact SD key=%s\n",
+ Dmsg3(50, "%s waiting %d sec for FD to contact SD key=%s\n",
jcr->Job, (int)(timeout.tv_sec-time(NULL)), jcr->sd_auth_key);
/*
break;
}
}
- Dmsg3(100, "Auth=%d canceled=%d errstat=%d\n", jcr->authenticated,
+ Dmsg3(50, "Auth=%d canceled=%d errstat=%d\n", jcr->authenticated,
job_canceled(jcr), errstat);
V(mutex);
memset(jcr->sd_auth_key, 0, strlen(jcr->sd_auth_key));
if (jcr->authenticated && !job_canceled(jcr)) {
- Dmsg1(100, "Running job %s\n", jcr->Job);
+ Dmsg1(50, "Running job %s\n", jcr->Job);
run_job(jcr); /* Run the job */
}
return false;
if (!(jcr=get_jcr_by_full_name(job_name))) {
Jmsg1(NULL, M_FATAL, 0, _("FD connect failed: Job name not found: %s\n"), job_name);
Dmsg1(3, "**** Job \"%s\" not found.\n", job_name);
+ fd->close();
return;
}
- jcr->file_bsock = fd;
- jcr->file_bsock->set_jcr(jcr);
- Dmsg1(110, "Found Job %s\n", job_name);
+ Dmsg1(50, "Found Job %s\n", job_name);
if (jcr->authenticated) {
Jmsg2(jcr, M_FATAL, 0, _("Hey!!!! JobId %u Job %s already authenticated.\n"),
(uint32_t)jcr->JobId, jcr->Job);
+ Dmsg2(50, "Hey!!!! JobId %u Job %s already authenticated.\n",
+ (uint32_t)jcr->JobId, jcr->Job);
+ fd->close();
free_jcr(jcr);
return;
}
+ jcr->file_bsock = fd;
+ jcr->file_bsock->set_jcr(jcr);
+
/*
* Authenticate the File daemon
*/
if (jcr->authenticated || !authenticate_filed(jcr)) {
- Dmsg1(100, "Authentication failed Job %s\n", jcr->Job);
+ Dmsg1(50, "Authentication failed Job %s\n", jcr->Job);
Jmsg(jcr, M_FATAL, 0, _("Unable to authenticate File daemon\n"));
} else {
jcr->authenticated = true;
- Dmsg2(110, "OK Authentication jid=%u Job %s\n", (uint32_t)jcr->JobId, jcr->Job);
+ Dmsg2(50, "OK Authentication jid=%u Job %s\n", (uint32_t)jcr->JobId, jcr->Job);
}
if (!jcr->authenticated) {
free_bsr(jcr->bsr);
jcr->bsr = NULL;
}
+ /* Free any restore volume list created */
+ free_restore_volume_list(jcr);
if (jcr->RestoreBootstrap) {
unlink(jcr->RestoreBootstrap);
free_pool_memory(jcr->RestoreBootstrap);