]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: use libxl_ctx passed to libxlConsoleCallback
authorJim Fehlig <jfehlig@suse.com>
Wed, 11 Feb 2015 21:54:43 +0000 (14:54 -0700)
committerJim Fehlig <jfehlig@suse.com>
Thu, 5 Mar 2015 16:05:34 +0000 (09:05 -0700)
Instead of using the libxl_ctx in the libxlDomainObjPrivatePtr,
use the ctx passed to the callback.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_domain.c

index e186c5317c9a55cff34db15bc7120e2db7daca7d..9af5758969fbdbd03ac36ca4b7ae013437794a57 100644 (file)
@@ -1158,10 +1158,9 @@ libxlDomainFreeMem(libxlDomainObjPrivatePtr priv, libxl_domain_config *d_config)
 }
 
 static void
-libxlConsoleCallback(libxl_ctx *ctx, libxl_eventev, void *for_callback)
+libxlConsoleCallback(libxl_ctx *ctx, libxl_event *ev, void *for_callback)
 {
     virDomainObjPtr vm = for_callback;
-    libxlDomainObjPrivatePtr priv = vm->privateData;
     size_t i;
 
     virObjectLock(vm);
@@ -1175,7 +1174,7 @@ libxlConsoleCallback(libxl_ctx *ctx, libxl_event* ev, void *for_callback)
             console_type =
                 (chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL ?
                  LIBXL_CONSOLE_TYPE_SERIAL : LIBXL_CONSOLE_TYPE_PV);
-            ret = libxl_console_get_tty(priv->ctx, ev->domid,
+            ret = libxl_console_get_tty(ctx, ev->domid,
                                         chr->target.port, console_type,
                                         &console);
             if (!ret) {