diff options
author | Max Kellermann <max@duempel.org> | 2013-10-18 10:49:23 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-18 10:50:14 +0200 |
commit | b105093dcdfc3f860a2d8f0c84bc94997efa50c4 (patch) | |
tree | 95c5dd3fd155f97b47956246972c71d9e4204eef /src | |
parent | d1c401fe7a637cdea728c8c2860d47c3d1e0efa0 (diff) | |
download | mpd-b105093dcdfc3f860a2d8f0c84bc94997efa50c4.tar.gz mpd-b105093dcdfc3f860a2d8f0c84bc94997efa50c4.tar.xz mpd-b105093dcdfc3f860a2d8f0c84bc94997efa50c4.zip |
ZeroconfAvahi: convert avahiRunning to a "bool"
Diffstat (limited to 'src')
-rw-r--r-- | src/ZeroconfAvahi.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ZeroconfAvahi.cxx b/src/ZeroconfAvahi.cxx index dfdc7d8ec..7a8954a56 100644 --- a/src/ZeroconfAvahi.cxx +++ b/src/ZeroconfAvahi.cxx @@ -40,7 +40,7 @@ static constexpr Domain avahi_domain("avahi"); static char *avahiName; -static int avahiRunning; +static bool avahi_running; static MyAvahiPoll *avahi_poll; static AvahiClient *avahiClient; static AvahiEntryGroup *avahiGroup; @@ -86,7 +86,7 @@ static void avahiGroupCallback(AvahiEntryGroup * g, avahi_strerror(avahi_client_errno (avahi_entry_group_get_client(g)))); /* Some kind of failure happened while we were registering our services */ - avahiRunning = 0; + avahi_running = false; break; case AVAHI_ENTRY_GROUP_UNCOMMITED: @@ -143,7 +143,7 @@ static void avahiRegisterService(AvahiClient * c) return; fail: - avahiRunning = 0; + avahi_running = false; } /* Callback when avahi changes state */ @@ -186,13 +186,13 @@ static void avahiClientCallback(AvahiClient * c, AvahiClientState state, FormatWarning(avahi_domain, "Could not reconnect: %s", avahi_strerror(reason)); - avahiRunning = 0; + avahi_running = false; } } else { FormatWarning(avahi_domain, "Client failure: %s (terminal)", avahi_strerror(reason)); - avahiRunning = 0; + avahi_running = false; } break; @@ -240,7 +240,7 @@ AvahiInit(EventLoop &loop, const char *serviceName) avahiName = avahi_strdup(serviceName); - avahiRunning = 1; + avahi_running = true; avahi_poll = new MyAvahiPoll(loop); |