mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Ignore unused streams in virStreamAbort
When virStreamAbort is called on a stream that has not been used yet, quite confusing error is returned: "this function is not supported by the connection driver". Let's just ignore such streams as there's nothing to abort anyway.
This commit is contained in:
parent
3398eeda75
commit
b136266d57
@ -13988,8 +13988,12 @@ int virStreamAbort(virStreamPtr stream)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream->driver &&
|
if (!stream->driver) {
|
||||||
stream->driver->streamAbort) {
|
VIR_DEBUG("aborting unused stream");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stream->driver->streamAbort) {
|
||||||
int ret;
|
int ret;
|
||||||
ret = (stream->driver->streamAbort)(stream);
|
ret = (stream->driver->streamAbort)(stream);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user