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

[libvirt] [PATCH 1/1] vz: minor cleanup in prlsdkDomainSetUserPassword



No need begin job for asynchronous operation.

Signed-off-by: Konstantin Neumoin <kneumoin virtuozzo com>
---
 src/vz/vz_sdk.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 138aea3..bc1a9eb 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -3926,30 +3926,18 @@ prlsdkDomainSetUserPassword(virDomainObjPtr dom,
                             const char *user,
                             const char *password)
 {
-    int ret = -1;
     vzDomObjPtr privdom = dom->privateData;
     PRL_HANDLE job = PRL_INVALID_HANDLE;
 
-    job = PrlVm_BeginEdit(privdom->sdkdom);
-    if (PRL_FAILED(waitDomainJob(job, dom)))
-        goto cleanup;
-
     job = PrlVm_SetUserPasswd(privdom->sdkdom,
                               user,
                               password,
                               0);
 
     if (PRL_FAILED(waitDomainJob(job, dom)))
-        goto cleanup;
-
-    job = PrlVm_CommitEx(privdom->sdkdom, 0);
-    if (PRL_FAILED(waitDomainJob(job, dom)))
-        goto cleanup;
-
-    ret = 0;
+        return -1;
 
- cleanup:
-    return ret;
+    return 0;
 }
 
 static int
-- 
2.7.4


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