vz: always pass graphics address to sdk

We need this because apply graphics functions is used on
update too. Also in case of NULL address resolve it to default
instead of error.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
Nikolay Shirokovskiy 2016-04-20 17:05:45 +03:00 committed by Maxim Nestratov
parent 96ca48451a
commit 851a751575

View File

@ -2772,12 +2772,10 @@ static int prlsdkApplyGraphicsParams(PRL_HANDLE sdkdom,
prlsdkCheckRetGoto(pret, cleanup);
}
if ((glisten = virDomainGraphicsGetListen(gr, 0))) {
if (!glisten->address)
goto cleanup;
pret = PrlVmCfg_SetVNCHostName(sdkdom, glisten->address);
prlsdkCheckRetGoto(pret, cleanup);
}
glisten = virDomainGraphicsGetListen(gr, 0);
pret = PrlVmCfg_SetVNCHostName(sdkdom, glisten && glisten->address ?
glisten->address : "");
prlsdkCheckRetGoto(pret, cleanup);
ret = 0;
cleanup: