Skip to content

Commit

Permalink
filedaemon: cleanup after failed authentications
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed May 19, 2016
1 parent d313ee8 commit 9d6c3e6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/filed/dir_cmd.c
Expand Up @@ -483,7 +483,7 @@ void *process_director_commands(JCR *jcr, BSOCK *dir)

/**********FIXME******* add command handler error code */

while (!quit) {
while (jcr->authenticated && (!quit)) {
/*
* Read command
*/
Expand Down Expand Up @@ -547,7 +547,6 @@ void *process_director_commands(JCR *jcr, BSOCK *dir)
Dmsg1(110, "End FD msg: %s\n", dir->msg);
}

bail_out:
generate_plugin_event(jcr, bEventJobEnd);

dequeue_messages(jcr); /* send any queued messages */
Expand Down Expand Up @@ -629,13 +628,10 @@ void *handle_director_connection(BSOCK *dir)
jcr = create_new_director_session(dir);

Dmsg0(120, "Calling Authenticate\n");
if (!authenticate_director(jcr)) {
return NULL;
if (authenticate_director(jcr)) {
Dmsg0(120, "OK Authenticate\n");
}

Dmsg0(120, "OK Authenticate\n");
jcr->authenticated = true;

return process_director_commands(jcr, dir);
}

Expand Down

0 comments on commit 9d6c3e6

Please sign in to comment.