提交 f8912d05 编写于 作者: K Konstantin Neumoin 提交者: Michal Privoznik

vz: minor cleanup in prlsdkDomainSetUserPassword

No need begin job for asynchronous operation.
Signed-off-by: NKonstantin Neumoin <kneumoin@virtuozzo.com>
上级 af4b0ed0
......@@ -3927,30 +3927,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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册