From: Chris Wong Date: Wed, 21 Apr 2010 09:47:15 +0000 (+0200) Subject: esx: Don't treat an empty root snapshot list as error X-Git-Tag: v0.8.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1fab0c21c77cf72acfc7e961b25dc34465e98ed;p=thirdparty%2Flibvirt.git esx: Don't treat an empty root snapshot list as error An empty root snapshot list was considered as error condition. Creating a new snapshot would fail if the domain didn't have snapshots yet, because the snapshot-create function tries to lookup the list of existing snapshots in order to verify that the snapshot name is unique. This fails if the domain doesn't have snapshots yet. Removing the NULL check from esxVI_LookupRootSnapshotTreeList fixes this. --- diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index e405c8038f..966ef85eb1 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -2503,12 +2503,6 @@ esxVI_LookupRootSnapshotTreeList } } - if (*rootSnapshotTreeList == NULL) { - ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", - _("Could not lookup root snapshot list")); - goto failure; - } - cleanup: esxVI_String_Free(&propertyNameList); esxVI_ObjectContent_Free(&virtualMachine);