src/dird/job.c
void update_job_end_record(JCR *jcr)
{
   jcr->jr.EndTime = time(NULL);
   jcr->end_time = jcr->jr.EndTime;
   jcr->jr.JobId = jcr->JobId;
   jcr->jr.JobStatus = jcr->JobStatus;
   jcr->jr.JobFiles = jcr->JobFiles;
   jcr->jr.JobBytes = jcr->JobBytes;
   jcr->jr.ReadBytes = jcr->ReadBytes;
   jcr->jr.VolSessionId = jcr->VolSessionId;
   jcr->jr.VolSessionTime = jcr->VolSessionTime;
   jcr->jr.JobErrors = jcr->JobErrors + jcr->SDErrors;
   jcr->jr.HasBase = jcr->HasBase;
   if (!db_update_job_end_record(jcr, jcr->db, &jcr->jr)) {
      Jmsg(jcr, M_WARNING, 0, _("Error updating job record. %s"),
         db_strerror(jcr->db));
   }
}
/*
 * Write status and such in DB
 */
Write status and such in DB
Write status and such in DB
void update_job_end_record(JCR *jcr)
{
   jcr->jr.EndTime = time(NULL);
   jcr->end_time = jcr->jr.EndTime;
   jcr->jr.JobId = jcr->JobId;
   jcr->jr.JobStatus = jcr->JobStatus;
   jcr->jr.JobFiles = jcr->JobFiles;
   jcr->jr.JobBytes = jcr->JobBytes;
   jcr->jr.ReadBytes = jcr->ReadBytes;
   jcr->jr.VolSessionId = jcr->VolSessionId;
   jcr->jr.VolSessionTime = jcr->VolSessionTime;
   jcr->jr.JobErrors = jcr->JobErrors + jcr->SDErrors;
   jcr->jr.HasBase = jcr->HasBase;
   if (!db_update_job_end_record(jcr, jcr->db, &jcr->jr)) {
      Jmsg(jcr, M_WARNING, 0, _("Error updating job record. %s"),
         db_strerror(jcr->db));
   }
}
void update_job_end_record ( JCR * jcr ) { jcr -> jr . EndTime = time ( NULL ) ; jcr -> end_time = jcr -> jr . EndTime ; jcr -> jr . JobId = jcr -> JobId ; jcr -> jr . JobStatus = jcr -> JobStatus ; jcr -> jr . JobFiles = jcr -> JobFiles ; jcr -> jr . JobBytes = jcr -> JobBytes ; jcr -> jr . ReadBytes = jcr -> ReadBytes ; jcr -> jr . VolSessionId = jcr -> VolSessionId ; jcr -> jr . VolSessionTime = jcr -> VolSessionTime ; jcr -> jr . JobErrors = jcr -> JobErrors + jcr -> SDErrors ; jcr -> jr . HasBase = jcr -> HasBase ; if ( ! db_update_job_end_record ( jcr , jcr -> db , & jcr -> jr ) ) { Jmsg ( jcr , M_WARNING , 0 , _ ( " " ) , db_strerror ( jcr -> db ) ) ; } }
Write status and such in DB
Write status and such in DB