projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a68a482
)
ipmi plugin: Fix crash in ipmi.so (interval < 0.5)
author
Mariusz Szafranski
<mariuszx.szafranski@intel.com>
Thu, 1 Mar 2018 12:07:56 +0000
(12:07 +0000)
committer
Mariusz Szafranski
<mariuszx.szafranski@intel.com>
Thu, 1 Mar 2018 12:07:56 +0000
(12:07 +0000)
Fixes crash (divide by 0) in ipmi.so when plugin related interval
set to 0.45 or less.
Change-Id: I3ac2282efdc005edefe92f870ac30417451c202c
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
src/ipmi.c
patch
|
blob
|
history
diff --git
a/src/ipmi.c
b/src/ipmi.c
index
2db344e
..
b110920
100644
(file)
--- a/
src/ipmi.c
+++ b/
src/ipmi.c
@@
-1210,7
+1210,7
@@
static int c_ipmi_init(void) {
}
/* Don't send `ADD' notifications during startup (~ 1 minute) */
- int cycles = 1 + (
60 / CDTIME_T_TO_TIME_T(plugin_get_interval()
));
+ int cycles = 1 + (
int)(TIME_T_TO_CDTIME_T(60) / plugin_get_interval(
));
st = instances;
while (NULL != st) {