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

[libvirt] [PATCH] parallels: fix return status for parallelsConnectOpen



We should return VIR_DRV_OPEN_ERROR in case
if we handle scheme in query but some
error occur. Previously we sometimes
return VIR_DRV_OPEN_DECLINE.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy parallels com>
---
 src/parallels/parallels_network.c |    2 +-
 src/parallels/parallels_storage.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c
index 47f4886..42ef836 100644
--- a/src/parallels/parallels_network.c
+++ b/src/parallels/parallels_network.c
@@ -349,7 +349,7 @@ parallelsNetworkOpen(virConnectPtr conn,
  error:
     virObjectUnref(privconn->networks);
     privconn->networks = NULL;
-    return VIR_DRV_OPEN_DECLINED;
+    return VIR_DRV_OPEN_ERROR;
 }
 
 int parallelsNetworkClose(virConnectPtr conn)
diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
index 6397601..4091124 100644
--- a/src/parallels/parallels_storage.c
+++ b/src/parallels/parallels_storage.c
@@ -494,7 +494,7 @@ parallelsStorageOpen(virConnectPtr conn,
  error:
     parallelsStorageUnlock(storageState);
     parallelsStorageClose(conn);
-    return -1;
+    return VIR_DRV_OPEN_ERROR;
 }
 
 static int
-- 
1.7.1


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