]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/job.c
Improve debug output scheduler+jobq+tracing
[bacula/bacula] / bacula / src / filed / job.c
index b3890910bd9757ab9978415f7777dccbab09a9cc..33238d6cd9b2592c2afeb2815bf49b84892b6557 100644 (file)
@@ -281,15 +281,16 @@ static int cancel_cmd(JCR *jcr)
 static int setdebug_cmd(JCR *jcr)
 {
    BSOCK *dir = jcr->dir_bsock;
-   int level;
+   int level, trace_flag;
 
    Dmsg1(110, "setdebug_cmd: %s", dir->msg);
-   if (sscanf(dir->msg, "setdebug=%d", &level) != 1 || level < 0) {
+   if (sscanf(dir->msg, "setdebug=%d", &level, &trace_flag) != 2 || level < 0) {
       pm_strcpy(&jcr->errmsg, dir->msg);
       bnet_fsend(dir, "2991 Bad setdebug command: %s\n", jcr->errmsg);
       return 0;   
    }
    debug_level = level;
+   set_trace(trace_flag);
    return bnet_fsend(dir, OKsetdebug, level);
 }
 
@@ -627,7 +628,6 @@ static int level_cmd(JCR *jcr)
       Dmsg2(100, "Got since time: %s mtime_only=%d\n", ctime(&mtime), mtime_only);
       jcr->incremental = 1;          /* set incremental or decremental backup */
       jcr->mtime = mtime;            /* set since time */
-      jcr->mtime_only = mtime_only;   /* and what to compare */
    /*
     * We get his UTC since time, then sync the clocks and correct it
     *  to agree with our clock.
@@ -677,7 +677,6 @@ static int level_cmd(JCR *jcr)
       Dmsg2(100, "adj = %d since_time=%d\n", (int)adj, (int)since_time);
       jcr->incremental = 1;          /* set incremental or decremental backup */
       jcr->mtime = since_time;       /* set since time */
-      jcr->mtime_only = mtime_only;   /* and what to compare */
    } else {
       Jmsg1(jcr, M_FATAL, 0, "Unknown backup level: %s\n", level);
       free_memory(level);