From: Vincent Hanquez Date: Mon, 20 Jul 2009 09:54:36 +0000 (+0100) Subject: use with_xcs instead of inlining what it does. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9358629d43d209c201a1d3520f0fb38a934e62cb;p=xenclient%2Ftoolstack.git use with_xcs instead of inlining what it does. --- diff --git a/xenvm/xenvm.ml b/xenvm/xenvm.ml index 66130a6..ec01fc9 100644 --- a/xenvm/xenvm.ml +++ b/xenvm/xenvm.ml @@ -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 + ) ) (*