]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
Status cleanup and cancelling FD
[bacula/bacula] / bacula / src / stored / dircmd.c
index 210f30b8b9606f0be89ba1eb3f92be11e9229cc0..aaed0fea09b7355f21d3f9040bd482de9b823ac0 100644 (file)
@@ -208,16 +208,15 @@ static int cancel_cmd(JCR *cjcr)
       } else {
         P(jcr->mutex);
         oldStatus = jcr->JobStatus;
-        jcr->JobStatus = JS_Cancelled;
-        if (!jcr->authenticated && jcr->JobStatus == JS_WaitFD) {
+        set_jcr_job_status(jcr, JS_Cancelled);
+        if (!jcr->authenticated && oldStatus == JS_WaitFD) {
            pthread_cond_signal(&jcr->job_start_wait); /* wake waiting thread */
         }
         V(jcr->mutex);
         if (jcr->file_bsock) {
            bnet_sig(jcr->file_bsock, BNET_TERMINATE);
         }
-         bnet_fsend(dir, _("3000 Job %s Status=%c marked to be cancelled.\n"), 
-           jcr->Job, oldStatus);
+         bnet_fsend(dir, _("3000 Job %s marked to be cancelled.\n"), jcr->Job);
         free_jcr(jcr);
       }
    } else {