diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-03-18 01:09:26 -0400 |
---|---|---|
committer | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-03-26 10:31:34 -0400 |
commit | bd8a37c7b3e29babe683a1f1bb65419be1cc3fdc (patch) | |
tree | 69fdcb0c9f117657fa7b9ec772f4b704adf93a7a | |
parent | bf19af806ceeff965a54a6c95b1bd5f149552439 (diff) |
bonjour-self: Announce the service name properly
We need to pass published_name@host when registering for the service
current code passes NULL, which lets mdns choose it's name.
-rw-r--r-- | src/bonjour-self.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bonjour-self.c b/src/bonjour-self.c index 856af022..601ce66f 100644 --- a/src/bonjour-self.c +++ b/src/bonjour-self.c @@ -324,9 +324,6 @@ _bonjour_service_register_cb (DNSServiceRef service_ref, return; } - _self->name = g_strdup_printf ("%s@%s", _self->published_name, - g_get_host_name ()); - salut_self_established (_self); } } @@ -351,8 +348,11 @@ salut_bonjour_self_announce (SalutSelf *_self, RETURN_ERROR_IF_FAIL (error_type, error); + _self->name = g_strdup_printf ("%s@%s", _self->published_name, + g_get_host_name ()); + error_type = DNSServiceRegister (&priv->bonjour_service, - kDNSServiceInterfaceIndexAny, 0, NULL, + kDNSServiceInterfaceIndexAny, 0, _self->name, dnssd_name, NULL, NULL, htons (port), 0, NULL, _bonjour_service_register_cb, self); |