mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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:
parent
94a1579b0a
commit
9cb18291af
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user