storage: Add check for different ports for host duplicate matching

In virStoragePoolSourceMatchSingleHost, add a comparison for port number
being different prior to checking the 'name' field.
This commit is contained in:
John Ferlan 2015-04-13 17:11:53 -04:00
parent 9aced8c9d5
commit 401623bcb4

View 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);
}