]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
use with_xcs instead of inlining what it does.
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Mon, 20 Jul 2009 09:54:36 +0000 (10:54 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Mon, 20 Jul 2009 09:54:36 +0000 (10:54 +0100)
xenvm/xenvm.ml

index 66130a6ba594bffd09f492db25457ef0e7e676b2..ec01fc907630cb6d5edbe8e3f0daa24a22e1c2a4 100644 (file)
@@ -607,10 +607,10 @@ let monitor_rpc socket state =
                ) !connections;
        done;
        if state.vm_domid <> (-1) then (
-               let xs = Xs.daemon_open () in
-               let xc = Xc.interface_open () in
-               Vmact.stop_vm xc xs state;
-               Vmact.change_vmstate state VmShutdown
+               with_xcs (fun xc xs ->
+                       Vmact.stop_vm xc xs state;
+                       Vmact.change_vmstate state VmShutdown
+               )
        )
 
 (*