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: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2015-06-04 17:34:42 +02:00
parent 94a1579b0a
commit 9cb18291af
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}