void log_reader_set_options(LogReader *s, LogPipe *control, LogReaderOptions *options, const gchar *stats_id, const gchar *stats_instance) { LogReader *self = (LogReader *) s; /* log_reader_reopen() needs to be called prior to set_options. This is * an ugly hack, but at least it is more explicitly than what used to be * here, which silently ignored if self->proto was NULL. */ g_assert(self->proto != NULL); gboolean pos_tracked = log_proto_server_is_position_tracked(self->proto); log_source_set_options(&self->super, &options->super, stats_id, stats_instance, (options->flags & LR_THREADED), pos_tracked, control->expr_node); log_pipe_unref(self->control); log_pipe_ref(control); self->control = control; self->options = options; log_proto_server_set_options(self->proto, &self->options->proto_options.super); log_proto_server_set_ack_tracker(self->proto, self->super.ack_tracker); }
void log_reader_set_options(LogReader *s, LogPipe *control, LogReaderOptions *options, gint stats_level, gint stats_source, const gchar *stats_id, const gchar *stats_instance) { LogReader *self = (LogReader *) s; gboolean pos_tracked = ((self->proto != NULL) && log_proto_server_is_position_tracked(self->proto)); log_source_set_options(&self->super, &options->super, stats_level, stats_source, stats_id, stats_instance, (options->flags & LR_THREADED), pos_tracked, control->expr_node); log_pipe_unref(self->control); log_pipe_ref(control); self->control = control; self->options = options; if (self->proto) log_proto_server_set_options(self->proto, &self->options->proto_options.super); }