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.
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
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
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