From 3e0adfe604e88dbd10fea82e723d04ad1ac443b8 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 22 Mar 2022 16:07:58 +0000 Subject: [PATCH] Feature: Added support for text streaming to use dumpfiles --- src/format_text.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/format_text.c b/src/format_text.c index b9261b35..5232da00 100644 --- a/src/format_text.c +++ b/src/format_text.c @@ -54,6 +54,10 @@ static size_t skipchar(char *text, char skip, size_t len) return ret; } +static void text_to_file (source_t *source, refbuf_t *refbuf) +{ + source_write_dumpfile(source, refbuf->data, refbuf->len); +} static refbuf_t *text_get_buffer(source_t *source) { @@ -97,7 +101,7 @@ int format_text_get_plugin(source_t *source) plugin->write_buf_to_client = format_generic_write_to_client; plugin->create_client_data = NULL; plugin->free_plugin = text_free_plugin; - plugin->write_buf_to_file = NULL; + plugin->write_buf_to_file = text_to_file; plugin->set_tag = NULL; plugin->apply_settings = NULL;