vz: minor cleanup in prlsdkDomainSetUserPassword

No need begin job for asynchronous operation.

Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
This commit is contained in:
Konstantin Neumoin 2017-05-03 13:44:52 +03:00 committed by Michal Privoznik
parent af4b0ed03e
commit f8912d0527

View File

@ -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;
return -1;
job = PrlVm_CommitEx(privdom->sdkdom, 0);
if (PRL_FAILED(waitDomainJob(job, dom)))
goto cleanup;
ret = 0;
cleanup:
return ret;
return 0;
}
static int