]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: Add check for different ports for host duplicate matching
authorJohn Ferlan <jferlan@redhat.com>
Mon, 13 Apr 2015 21:11:53 +0000 (17:11 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Apr 2015 10:40:07 +0000 (06:40 -0400)
In virStoragePoolSourceMatchSingleHost, add a comparison for port number
being different prior to checking the 'name' field.

src/conf/storage_conf.c

index f609f85762f4a30e2797bc23ee86c04bdf429009..313098bbe1cfd983f5a651d23b58b96dabf576fb 100644 (file)
@@ -2412,6 +2412,9 @@ virStoragePoolSourceMatchSingleHost(virStoragePoolSourcePtr poolsrc,
     if (poolsrc->nhost != 1 && defsrc->nhost != 1)
         return false;
 
+    if (poolsrc->hosts[0].port != defsrc->hosts[0].port)
+        return false;
+
     return STREQ(poolsrc->hosts[0].name, defsrc->hosts[0].name);
 }