libxl: fix build failure due to change in virDomainGraphicsDef

This failure was introduced by commit dacee3d, which removed
listenAddr from the unions in virDomainGraphicsDef in favor of putting
it in the address attribute of virDomainGraphicsListenDef.
This commit is contained in:
Laine Stump 2011-07-28 14:38:14 -04:00
parent 99e4b30b39
commit eb1e3143da

View File

@ -651,6 +651,7 @@ libxlMakeVfb(libxlDriverPrivatePtr driver, virDomainDefPtr def,
virDomainGraphicsDefPtr l_vfb, libxl_device_vfb *x_vfb) virDomainGraphicsDefPtr l_vfb, libxl_device_vfb *x_vfb)
{ {
int port; int port;
const char *listenAddr;
switch (l_vfb->type) { switch (l_vfb->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
@ -682,11 +683,11 @@ libxlMakeVfb(libxlDriverPrivatePtr driver, virDomainDefPtr def,
} }
x_vfb->vncdisplay = l_vfb->data.vnc.port - LIBXL_VNC_PORT_MIN; x_vfb->vncdisplay = l_vfb->data.vnc.port - LIBXL_VNC_PORT_MIN;
if (l_vfb->data.vnc.listenAddr) { listenAddr = virDomainGraphicsListenGetAddress(l_vfb, 0);
if (listenAddr) {
/* libxl_device_vfb_init() does strdup("127.0.0.1") */ /* libxl_device_vfb_init() does strdup("127.0.0.1") */
free(x_vfb->vnclisten); free(x_vfb->vnclisten);
if ((x_vfb->vnclisten = if ((x_vfb->vnclisten = strdup(listenAddr)) == NULL) {
strdup(l_vfb->data.vnc.listenAddr)) == NULL) {
virReportOOMError(); virReportOOMError();
return -1; return -1;
} }