]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix bug in storage driver accessing wrong private data
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Dec 2009 09:38:11 +0000 (09:38 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 17 Dec 2009 16:51:30 +0000 (16:51 +0000)
* src/storage/storage_driver.c: Fix IsPersistent() and IsActivE()
  methods on storage pools to use 'storagePrivateData' instead
  of 'privateData'. Also fix naming convention of objects

src/storage/storage_driver.c

index e01d5ae4d57f80c9a7675ea7c765e78f3d68b435..c2f7850aa261ff1d0c9a21d61d28be73525905ef 100644 (file)
@@ -465,17 +465,17 @@ cleanup:
 }
 
 
-static int storagePoolIsActive(virStoragePoolPtr net)
+static int storagePoolIsActive(virStoragePoolPtr pool)
 {
-    virStorageDriverStatePtr driver = net->conn->privateData;
+    virStorageDriverStatePtr driver = pool->conn->storagePrivateData;
     virStoragePoolObjPtr obj;
     int ret = -1;
 
     storageDriverLock(driver);
-    obj = virStoragePoolObjFindByUUID(&driver->pools, net->uuid);
+    obj = virStoragePoolObjFindByUUID(&driver->pools, pool->uuid);
     storageDriverUnlock(driver);
     if (!obj) {
-        virStorageReportError(net->conn, VIR_ERR_NO_STORAGE_POOL, NULL);
+        virStorageReportError(pool->conn, VIR_ERR_NO_STORAGE_POOL, NULL);
         goto cleanup;
     }
     ret = virStoragePoolObjIsActive(obj);
@@ -486,17 +486,17 @@ cleanup:
     return ret;
 }
 
-static int storagePoolIsPersistent(virStoragePoolPtr net)
+static int storagePoolIsPersistent(virStoragePoolPtr pool)
 {
-    virStorageDriverStatePtr driver = net->conn->privateData;
+    virStorageDriverStatePtr driver = pool->conn->storagePrivateData;
     virStoragePoolObjPtr obj;
     int ret = -1;
 
     storageDriverLock(driver);
-    obj = virStoragePoolObjFindByUUID(&driver->pools, net->uuid);
+    obj = virStoragePoolObjFindByUUID(&driver->pools, pool->uuid);
     storageDriverUnlock(driver);
     if (!obj) {
-        virStorageReportError(net->conn, VIR_ERR_NO_STORAGE_POOL, NULL);
+        virStorageReportError(pool->conn, VIR_ERR_NO_STORAGE_POOL, NULL);
         goto cleanup;
     }
     ret = obj->configFile ? 1 : 0;