static void _init(AckRecord *self) { self->acked = FALSE; log_msg_ref(self->original); log_msg_refcache_start_producer(self->original); log_msg_add_ack(self->original, &self->path_options); log_msg_ref(self->original); log_msg_write_protect(self->original); }
static gboolean log_reader_handle_line(LogReader *self, const guchar *line, gint length, LogTransportAuxData *aux) { LogMessage *m; msg_debug("Incoming log entry", evt_tag_printf("line", "%.*s", length, line)); /* use the current time to get the time zone offset */ m = log_msg_new((gchar *) line, length, aux->peer_addr ? : self->peer_addr, &self->options->parse_options); log_msg_refcache_start_producer(m); log_transport_aux_data_foreach(aux, _add_aux_nvpair, m); log_source_post(&self->super, m); log_msg_refcache_stop(); return log_source_free_to_send(&self->super); }
static gboolean log_reader_handle_line(LogReader *self, const guchar *line, gint length, GSockAddr *saddr) { LogMessage *m; LogPathOptions path_options = LOG_PATH_OPTIONS_INIT; msg_debug("Incoming log entry", evt_tag_printf("line", "%.*s", length, line), NULL); /* use the current time to get the time zone offset */ m = log_msg_new((gchar *) line, length, saddr, &self->options->parse_options); log_msg_refcache_start_producer(m); if (!m->saddr && self->peer_addr) { m->saddr = g_sockaddr_ref(self->peer_addr); } log_pipe_queue(&self->super.super, m, &path_options); log_msg_refcache_stop(); return log_source_free_to_send(&self->super); }