iscsi: do not fail to stop a stopped pool

Just as we allow stopping filesystem pools when they were unmounted
externally, do not fail to stop an iscsi pool when someone else
closed the session externally.

Reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1171984
This commit is contained in:
Ján Tomko 2015-04-29 14:59:08 +02:00
parent 198cc1d339
commit a41b1f196c

View File

@ -449,8 +449,13 @@ virStorageBackendISCSIStopPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool)
{
char *portal;
char *session;
int ret = -1;
if ((session = virStorageBackendISCSISession(pool, true)) == NULL)
return 0;
VIR_FREE(session);
if ((portal = virStorageBackendISCSIPortal(&pool->def->source)) == NULL)
return -1;