提交 b136266d 编写于 作者: J Jiri Denemark

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.
上级 3398eeda
......@@ -13988,8 +13988,12 @@ int virStreamAbort(virStreamPtr stream)
return -1;
}
if (stream->driver &&
stream->driver->streamAbort) {
if (!stream->driver) {
VIR_DEBUG("aborting unused stream");
return 0;
}
if (stream->driver->streamAbort) {
int ret;
ret = (stream->driver->streamAbort)(stream);
if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册