summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2541eb)
raw | patch | inline | side by side (parent: b2541eb)
author | Francesco Romani <fromani@redhat.com> | |
Mon, 12 Dec 2016 15:07:25 +0000 (16:07 +0100) | ||
committer | Francesco Romani <fromani@redhat.com> | |
Mon, 12 Dec 2016 15:07:25 +0000 (16:07 +0100) |
Even though we handle disconnection and reconnection
in the read() callback, we expect the libvirt connection
to be available most of the time, including the init()
stage.
Thus, let's fail init() if the connection is not available.
Signed-off-by: Francesco Romani <fromani@redhat.com>
in the read() callback, we expect the libvirt connection
to be available most of the time, including the init()
stage.
Thus, let's fail init() if the connection is not available.
Signed-off-by: Francesco Romani <fromani@redhat.com>
src/virt.c | patch | blob | history |
diff --git a/src/virt.c b/src/virt.c
index 242d0d33a4df04c3ab18645a843fccd2b670645b..93f9aee30d80bdb2427c3edd86191966326c9c19 100644 (file)
--- a/src/virt.c
+++ b/src/virt.c
if (virInitialize() != 0)
return -1;
- lv_connect();
+ if (lv_connect() != 0)
+ return -1;
DEBUG(PLUGIN_NAME " plugin: starting %i instances", nr_instances);