Don't allow a delegate log to be opened if it isn't used

This commit is contained in:
Jeremy Lakeman 2018-03-28 15:35:08 +10:30
parent 65d0e3a47c
commit 3388170468

View File

@ -77,7 +77,7 @@ static bool_t is_log_delegate_available(const struct log_output_iterator *UNUSED
static void log_delegate_open(struct log_output_iterator *it) static void log_delegate_open(struct log_output_iterator *it)
{ {
struct log_output_delegate_state *state = _state(*it->output); struct log_output_delegate_state *state = _state(*it->output);
if (!state->opened) { if (serval_log_delegate.print && !state->opened) {
state->opened = 1; state->opened = 1;
if (serval_log_delegate.show_prolog) if (serval_log_delegate.show_prolog)
serval_log_print_prolog(it); serval_log_print_prolog(it);