[PATCH 18/18] vz: always pass graphics address to sdk

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

 



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@xxxxxxxxxxxxx>
---
 src/vz/vz_sdk.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 334b2d0..5a45e43 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2780,12 +2780,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:
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]