summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch')
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch b/meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch
new file mode 100644
index 000000000..9e3d64bbf
--- /dev/null
+++ b/meta-oe/recipes-support/syslog-ng/files/logwriter-dont-allocate-a-new-buffer.patch
@@ -0,0 +1,26 @@
1logwriter: Don't allocate a new buffer if fails to consume current item
2
3Upstream-Status: Pending
4
5Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
6---
7--- a/lib/logwriter.c
8+++ b/lib/logwriter.c
9@@ -1010,7 +1010,7 @@
10 {
11 status = log_proto_client_post(proto, (guchar *) self->line_buffer->str, self->line_buffer->len, &consumed);
12
13- if (consumed)
14+ if (consumed && status != LPS_ERROR)
15 log_writer_realloc_line_buffer(self);
16
17 if (status == LPS_ERROR)
18@@ -1028,7 +1028,7 @@
19 NULL);
20 consumed = TRUE;
21 }
22- if (consumed)
23+ if (consumed && status != LPS_ERROR)
24 {
25 if (lm->flags & LF_LOCAL)
26 step_sequence_number(&self->seq_num);