projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98d2551
)
libcollectdclient: Write only metrics with the requested security level.
author
Florian Forster
<octo@collectd.org>
Tue, 2 May 2017 09:21:48 +0000
(11:21 +0200)
committer
Florian Forster
<octo@collectd.org>
Tue, 2 May 2017 09:21:48 +0000
(11:21 +0200)
src/libcollectdclient/network_parse.c
patch
|
blob
|
history
diff --git
a/src/libcollectdclient/network_parse.c
b/src/libcollectdclient/network_parse.c
index
83a05d4
..
3a42889
100644
(file)
--- a/
src/libcollectdclient/network_parse.c
+++ b/
src/libcollectdclient/network_parse.c
@@
-529,9
+529,11
@@
static int network_parse(void *data, size_t data_size, lcc_security_level_t sl,
return EINVAL;
}
- /* TODO(octo): skip if current_security_level < required_security_level */
+ int status = 0;
- int status = opts->writer(&vl);
+ /* Write metrics if they have the required security level. */
+ if (sl >= opts->security_level)
+ status = opts->writer(&vl);
free(vl.values);
free(vl.values_types);