From ad5af4bd8ab7311a1e28fc8d92bd75b8a0830f36 Mon Sep 17 00:00:00 2001 From: badaix Date: Wed, 19 Oct 2016 09:27:40 +0200 Subject: [PATCH] fixed typo --- server/publishZeroConf/publishAvahi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/publishZeroConf/publishAvahi.cpp b/server/publishZeroConf/publishAvahi.cpp index f1f655ca..acbfc71d 100644 --- a/server/publishZeroConf/publishAvahi.cpp +++ b/server/publishZeroConf/publishAvahi.cpp @@ -128,10 +128,9 @@ void PublishAvahi::entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState void PublishAvahi::create_services(AvahiClient *c) { - char *n, r[128]; - int ret; assert(c); - + char *n; + /// If this is the first time we're called, let's create a new entry group if necessary if (!group) { @@ -143,12 +142,13 @@ void PublishAvahi::create_services(AvahiClient *c) } /// If the group is empty (either because it was just created, or because it was reset previously, add our entries. + int ret; if (avahi_entry_group_is_empty(group)) { logO << "Adding service '" << name << "'\n"; /// We will now add two services and one subtype to the entry group - for (const auto& service: services) + for (const auto& service: services_) { if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AvahiPublishFlags(0), name, service.name_.c_str(), NULL, NULL, service.port_, NULL)) < 0) {