提交 cccc3fc1 编写于 作者: D Daniel P. Berrangé

access: report an error if no access manager is present

The code calling this method expects it to have reported an error on
failure.
Reviewed-by: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 39a7dff7
......@@ -65,6 +65,12 @@ VIR_ONCE_GLOBAL_INIT(virAccessManager);
virAccessManagerPtr virAccessManagerGetDefault(void)
{
if (virAccessManagerDefault == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("No access manager registered"));
return NULL;
}
return virObjectRef(virAccessManagerDefault);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册