projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc4d47e
)
journald: properly sum up entry size counter
author
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Aug 2014 01:37:56 +0000
(
03:37
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Aug 2014 02:14:02 +0000
(
04:14
+0200)
We should read the entry size before moving to the next iovec, not
after.
src/journal/journald-native.c
patch
|
blob
|
history
diff --git
a/src/journal/journald-native.c
b/src/journal/journald-native.c
index
6bc5df7
..
aded998
100644
(file)
--- a/
src/journal/journald-native.c
+++ b/
src/journal/journald-native.c
@@
-153,8
+153,8
@@
void server_process_native_message(
* field */
iovec[n].iov_base = (char*) p;
iovec[n].iov_len = l;
- n++;
entry_size += iovec[n].iov_len;
+ n++;
/* We need to determine the priority
* of this entry for the rate limiting
@@
-246,8
+246,8
@@
void server_process_native_message(
if (valid_user_field(p, e - p, false)) {
iovec[n].iov_base = k;
iovec[n].iov_len = (e - p) + 1 + l;
- n++;
entry_size += iovec[n].iov_len;
+ n++;
} else
free(k);