zeroconf/Avahi: throw exception instead of raising fatal error
This commit is contained in:
@@ -22,8 +22,8 @@
|
|||||||
#include "AvahiPoll.hxx"
|
#include "AvahiPoll.hxx"
|
||||||
#include "ZeroconfInternal.hxx"
|
#include "ZeroconfInternal.hxx"
|
||||||
#include "Listen.hxx"
|
#include "Listen.hxx"
|
||||||
#include "system/FatalError.hxx"
|
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
|
#include "util/RuntimeError.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
#include <avahi-client/client.h>
|
#include <avahi-client/client.h>
|
||||||
@@ -240,7 +240,7 @@ AvahiInit(EventLoop &loop, const char *serviceName)
|
|||||||
LogDebug(avahi_domain, "Initializing interface");
|
LogDebug(avahi_domain, "Initializing interface");
|
||||||
|
|
||||||
if (!avahi_is_valid_service_name(serviceName))
|
if (!avahi_is_valid_service_name(serviceName))
|
||||||
FormatFatalError("Invalid zeroconf_name \"%s\"", serviceName);
|
throw FormatRuntimeError("Invalid zeroconf_name \"%s\"", serviceName);
|
||||||
|
|
||||||
avahi_name = avahi_strdup(serviceName);
|
avahi_name = avahi_strdup(serviceName);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user