提交 9cb18291 编写于 作者: M Martin Kletzander

mdns: Set error when failing due to missing avahi

When building without avahi support, we used VIR_DEBUG() to note that to
the user.  However, functions that fail because of that (return NULL/-1)
did not set the error message.  This was the only file that forgot to do
such thing.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 94a1579b
......@@ -617,14 +617,14 @@ static const char *unsupported = N_("avahi not available at build time");
virNetServerMDNS *
virNetServerMDNSNew(void)
{
VIR_DEBUG("%s", _(unsupported));
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return NULL;
}
int
virNetServerMDNSStart(virNetServerMDNS *mdns ATTRIBUTE_UNUSED)
{
VIR_DEBUG("%s", _(unsupported));
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
......@@ -632,7 +632,7 @@ virNetServerMDNSGroupPtr
virNetServerMDNSAddGroup(virNetServerMDNS *mdns ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED)
{
VIR_DEBUG("%s", _(unsupported));
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return NULL;
}
......@@ -648,7 +648,7 @@ virNetServerMDNSAddEntry(virNetServerMDNSGroupPtr group ATTRIBUTE_UNUSED,
const char *type ATTRIBUTE_UNUSED,
int port ATTRIBUTE_UNUSED)
{
VIR_DEBUG("%s", _(unsupported));
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册