]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/fd_cmds.c
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / bacula / src / dird / fd_cmds.c
index b24cff0eaeb84ff79630f026c25f92a30c215a69..71d9fc3b6158a912d5cfd07ae53cee1dcb9e91db 100644 (file)
@@ -123,8 +123,8 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
     * Now send JobId and authorization key
     */
    fd->fsend(jobcmd, edit_int64(jcr->JobId, ed1), jcr->Job, jcr->VolSessionId,
-      jcr->VolSessionTime, jcr->sd_auth_key);
-   if (strcmp(jcr->sd_auth_key, "dummy") != 0) {
+             jcr->VolSessionTime, jcr->sd_auth_key);
+   if (!jcr->keep_sd_auth_key && strcmp(jcr->sd_auth_key, "dummy")) {
       memset(jcr->sd_auth_key, 0, strlen(jcr->sd_auth_key));
    }
    Dmsg1(100, ">filed: %s", fd->msg);