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>
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: