[Bug 47072] Add self-advertise support on Windows using the Apple Bonjour DNS-SD implementation

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 12 15:29:30 CET 2012


https://bugs.freedesktop.org/show_bug.cgi?id=47072

--- Comment #6 from Jonny Lamb <jonny.lamb at collabora.co.uk> 2012-03-12 14:29:30 UTC ---
Okay I had a look at this. It generally looks fine. A couple of minor points
here. I'll only insist that the ones which break the build are fixed, the rest
are up to you.

+ case PROP_DISCOVERY_CLIENT:
+   priv->discovery_client = g_value_get_object (value);
+   g_object_ref (priv->discovery_client);

You can use g_value_dup_object here if you want.

+ else if (!salut_bonjour_contact_has_services (SALUT_BONJOUR_CONTACT
(contact)))
+   {
+    g_object_ref (contact);
+   }

Indentation problem here.

+ DEBUG("Browser removed for %s", name);

Missing space.

+ if (mode)
+   {
+     error_type = DNSServiceUpdateRecord (priv->bonjour_service,
+         *dns_record, 0, size, data, time_out);
+
+     if (error_type != kDNSServiceErr_NoError)
+       {
+         DEBUG ("Error Updating Record : (%d)", error_type);
+         return error_type;
+       }
+   }
+ else
+   {
+     error_type = DNSServiceAddRecord (priv->bonjour_service,
+         dns_record, 0, rrtype, size, data, time_out);
+
+     if (error_type != kDNSServiceErr_NoError)
+       {
+         DEBUG ("Error Adding Record : (%d)", error_type);
+         return error_type;
+       }
+   }
+
+ return error_type;

You could probably refactor this to remove most of the duplication here.

+ /* Tubes are not currently supported by bonjour backend */
+#ifdef USE_BACKEND_AVAHI

I wonder if it would better to use:

    #ifndef USE_BACKEND_BONJOUR ?

(In reply to comment #5)
> additionally, you've rebased this quite weirdly, starting from this commit:

Yes this must be fixed before merging.

Now please please please run `make distcheck` and make sure it works, and
report back here.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list