From 339b5c83eb27ceff99fb16947b19899dd333d09e Mon Sep 17 00:00:00 2001 From: Jonathan Bagg Date: Wed, 11 Apr 2018 13:22:43 -0400 Subject: [PATCH] AvahiClient - publish does not need to store name, type, domain and port anymore. --- avahiclient.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/avahiclient.cpp b/avahiclient.cpp index 9488c17..5ada270 100644 --- a/avahiclient.cpp +++ b/avahiclient.cpp @@ -209,8 +209,6 @@ public: AvahiServiceBrowser *browser; QMap resolvers; AvahiStringList *txt; - QString name, type, domain; - quint16 port; }; @@ -236,18 +234,9 @@ void QZeroConf::startServicePublish(const char *name, const char *type, const ch return; } - pri->name = name; - pri->type = type; - pri->domain = domain; - pri->port = port; - pri->group = avahi_entry_group_new(pri->client, QZeroConfPrivate::groupCallback, pri); - int ret = avahi_entry_group_add_service_strlst(pri->group, - AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_UPDATE, - pri->name.toUtf8(), pri->type.toUtf8(), pri->domain.toUtf8(), - NULL, pri->port, pri->txt); - + int ret = avahi_entry_group_add_service_strlst(pri->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_UPDATE, name, type, domain, NULL, port, pri->txt); if (ret < 0) { avahi_entry_group_free(pri->group); pri->group = NULL;