[libvirt-java] [PATCH 27/65] Call processError only when virInitialize signalled an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx>
---
 src/main/java/org/libvirt/Library.java |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/libvirt/Library.java b/src/main/java/org/libvirt/Library.java
index 33d3042..95c13cb 100644
--- a/src/main/java/org/libvirt/Library.java
+++ b/src/main/java/org/libvirt/Library.java
@@ -1,6 +1,7 @@
 package org.libvirt;
 
 import org.libvirt.jna.Libvirt;
+import static org.libvirt.ErrorHandler.processError;
 
 import com.sun.jna.Native;
 import com.sun.jna.Pointer;
@@ -24,10 +25,9 @@ final class Library {
 
     // Load the native part
     static {
-        Libvirt.INSTANCE.virInitialize();
         libvirt = Libvirt.INSTANCE;
         try {
-            ErrorHandler.processError(Libvirt.INSTANCE);
+            processError(libvirt.virInitialize());
         } catch (Exception e) {
             e.printStackTrace();
         }
-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]