+Wed Jul 16 22:36:43 CEST 2008 Daniel Veillard <veillard@redhat.com>
+
+ * src/libvirt.c src/openvz_driver.c: fix the description of the ID
+ domain lookup and fix the OpenVZ routine
+
Wed Jul 16 17:25:02 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/openvz_driver.c: fix the lookup by ID function and error
* @id: the domain ID number
*
* Try to find a domain based on the hypervisor ID number
+ * Note that this won't work for inactive domains which have an ID of -1,
+ * in that case a lookup based on the Name or UUId need to be done instead.
*
* Returns a new domain object or NULL in case of failure. If the
* domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.
vm = openvzFindVMByID(driver, id);
- if (!vm) { /*try to find by name*/
- char name[OPENVZ_NAME_MAX];
- if (snprintf(name, OPENVZ_NAME_MAX, "%d",id) >= OPENVZ_NAME_MAX) {
- openvzError(conn, VIR_ERR_INTERNAL_ERROR, _("Too long domain name"));
- return NULL;
- }
- vm = openvzFindVMByName(driver, name);
- }
-
if (!vm) {
openvzError(conn, VIR_ERR_NO_DOMAIN, NULL);
return NULL;