]> xenbits.xen.org Git - xenclient/toolstack.git/commitdiff
prepend a uuid_ to bus name uuid part
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Fri, 21 Aug 2009 15:30:00 +0000 (16:30 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Fri, 21 Aug 2009 15:30:00 +0000 (16:30 +0100)
fix bug when the bus name starts with a digit 0-9 (uuid starts with 0-9) and
elements between should not start with a digit unless the bus name start with a
colon character.

xenvm/xenvm.ml
xenvm/xenvmlib.ml

index 4f9ec7259dee6e2ff97b4ac4996d37d81f30360a..32e0a3a0f52977efa1cdd7e190167ac710317c5e 100644 (file)
@@ -642,7 +642,7 @@ let monitor_rpc_json socket state =
 
 let monitor_rpc_dbus state =
        let use_session = state.vm_monitors.monitor_use_dbus_session in
-       let intf = Printf.sprintf "org.xen.vm.%s" (String.replace "-" "_" state.vm_uuid) in
+       let intf = Printf.sprintf "org.xen.vm.uuid_%s" (String.replace "-" "_" state.vm_uuid) in
        let match_s = sprintf "type='method',interface='%s'" intf in
        let bus = DBus.Bus.get (if use_session then DBus.Bus.Session else DBus.Bus.System) in
        let reply = DBus.Bus.request_name bus intf [ DBus.Bus.DoNotQueue ] in
index 57a95ec5d22261ea5dadbe24e2cff9fc03e1647e..0942da7f8d3d740007c89fd2aaf70305405cb8e4 100644 (file)
@@ -169,7 +169,7 @@ let request ?timeout id query =
        let bus = connect () in
        let timeout = match timeout with None -> 0 | Some t -> int_of_float (t *. 1000.) in
 
-       let intf = Printf.sprintf "org.xen.vm.%s" (String.replace "-" "_" id) in
+       let intf = Printf.sprintf "org.xen.vm.uuid_%s" (String.replace "-" "_" id) in
        let dest = intf in
 
        let method_name, params = query in
@@ -187,7 +187,7 @@ let request ?timeout id query =
 
 let check ?timeout id =
        let bus = connect () in
-       let intf = Printf.sprintf "org.xen.vm.%s" (String.replace "-" "_" id) in
+       let intf = Printf.sprintf "org.xen.vm.uuid_%s" (String.replace "-" "_" id) in
        DBus.Bus.has_owner bus intf
 end