Skip to content

Commit

Permalink
Should only set debug log fd, after running through radlog_init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 25, 2014
1 parent f052c72 commit f818292
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/log.c
Expand Up @@ -210,13 +210,6 @@ int radlog_init(fr_log_t *log, bool daemonize)
{
int devnull;

/*
* This handles setting up all the talloc logging
* and callbacks too.
*/
fr_fault_set_log_fn(_radlog_info);
if (default_log.fd > -1) fr_fault_set_log_fd(default_log.fd);

/*
* If we're running in foreground mode, save STDIN /
* STDERR as higher FDs, which won't get used by anyone
Expand Down Expand Up @@ -308,6 +301,13 @@ int radlog_init(fr_log_t *log, bool daemonize)

close(devnull);

/*
* This handles setting up all the talloc logging
* and callbacks too.
*/
fr_fault_set_log_fn(_radlog_info);
fr_fault_set_log_fd(log->fd);

return 0;
}

Expand Down

0 comments on commit f818292

Please sign in to comment.