X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=wui_thread.c;fp=wui_thread.c;h=9dab95c2d29e49eacd0769aa476fc26c9649bd89;hb=838aa4673bea4bf0e33a9e5045e4deba393a317d;hp=0585c898590fbe04384ef059edc427ff9d8e4553;hpb=f4f6a4d699c857e97a6fca07df3b942de7649f67;p=ovirt-viewer.git diff --git a/wui_thread.c b/wui_thread.c index 0585c89..9dab95c 100644 --- a/wui_thread.c +++ b/wui_thread.c @@ -977,6 +977,7 @@ parse_vm_from_xml (xmlNodePtr node) vm.hostid = -1; vm.id = -1; vm.vnc_port = -1; + vm.forward_vnc_port = -1; vm.mem_allocated = -1; vm.mem_used = -1; vm.vcpus_allocated = -1; @@ -1053,6 +1054,13 @@ parse_vm_from_xml (xmlNodePtr node) xmlFree (str); } } + else if (xmlStrcmp (p->name, (const xmlChar *) "forward-vnc-port") == 0) { + str = xmlNodeGetContent (p); + if (str != NULL) { + vm.forward_vnc_port = strtol ((char *) str, NULL, 10); + xmlFree (str); + } + } else if (xmlStrcmp (p->name, (const xmlChar *) "vnic-mac-addr") == 0) { str = xmlNodeGetContent (p); if (str != NULL) { @@ -1072,6 +1080,8 @@ parse_vm_from_xml (xmlNodePtr node) DEBUG ("required field \"description\" missing from structure"); else if (vm.vnc_port == -1) DEBUG ("required field \"vnc-port\" missing from structure"); + else if (vm.forward_vnc_port == -1) + DEBUG ("required field \"forward-vnc-port\" missing from structure"); else if (vm.uuid == NULL) DEBUG ("required field \"uuid\" missing from structure"); else