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>
if (virInitialize() != 0)
return -1;
- lv_connect();
+ if (lv_connect() != 0)
+ return -1;
DEBUG(PLUGIN_NAME " plugin: starting %i instances", nr_instances);