projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb98f71
)
ceph plugin: Ensure that at least one daemon is configured in cconn_main_loop().
author
Florian Forster
<octo@collectd.org>
Fri, 2 Sep 2016 06:23:27 +0000
(08:23 +0200)
committer
Florian Forster
<octo@collectd.org>
Fri, 2 Sep 2016 06:23:27 +0000
(08:23 +0200)
This addresses a scan-build issue.
src/ceph.c
patch
|
blob
|
history
diff --git
a/src/ceph.c
b/src/ceph.c
index
e6d3767
..
ad0688c
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-1468,6
+1468,12
@@
static int cconn_main_loop(uint32_t request_type)
struct timeval end_tv;
struct cconn io_array[g_num_daemons];
+ if (g_num_daemons < 1)
+ {
+ ERROR ("ceph plugin: No daemons configured. See the \"Daemon\" config option.");
+ return ENOENT;
+ }
+
DEBUG("ceph plugin: entering cconn_main_loop(request_type = %d)", request_type);
/* create cconn array */