linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] hostname: Fix "BlueZ 5.XX" adapter name on startup
Date: Wed, 20 Sep 2017 18:35:33 +0200	[thread overview]
Message-ID: <1505925333.9350.7.camel@hadess.net> (raw)
In-Reply-To: <0268513E-AD33-4E4E-A926-2EC695DC1D86@holtmann.org>

On Wed, 2017-09-20 at 17:48 +0200, Marcel Holtmann wrote:
> Hi Bastien,
> 
> > The hostname plugin listens to property changes from systemd-
> > hostnamed
> > but doesn't fetch initial values. This means that unless the
> > PrettyHostname or StaticHostname changes, the default adapter will
> > be
> > called "BlueZ 5.XX" matching the version number.
> > 
> > This is the case since the hostname plugin replaced the adaptername
> > plugin in 2012.
> > 
> > Fetch the initial values for PrettyHostname, StaticHostname and
> > Chassis when the plugin is initiated, so as to make the values
> > available for adapter setup.
> > ---
> > plugins/hostname.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> > 
> > diff --git a/plugins/hostname.c b/plugins/hostname.c
> > index f876d0afb..db9187378 100644
> > --- a/plugins/hostname.c
> > +++ b/plugins/hostname.c
> > @@ -307,6 +307,10 @@ static int hostname_init(void)
> > 		hostname_proxy = NULL;
> > 		g_dbus_client_unref(hostname_client);
> > 		hostname_client = NULL;
> > +	} else {
> > +		g_dbus_proxy_refresh_property(hostname_proxy,
> > "PrettyHostname");
> > +		g_dbus_proxy_refresh_property(hostname_proxy,
> > "StaticHostname");
> > +		g_dbus_proxy_refresh_property(hostname_proxy,
> > "Chassis");
> > 	}
> 
> I am 100% certain that I tested this since this would be a really
> dumb plugin otherwise.

You don't say ;)

>  However is it possible that when calling GetManagedObjects the
> values are not returned correctly?

get_managed_objects() in gdbus/client.c is never called for this
GDBusClient.

>  Can we check that. Or does the property watch has an issue not
> calling the callback correctly.

The property watch code in add_property() and in properties_changed()
is never called either.

This is the debug I used:
https://github.com/hadess/bluez/commit/54ce125be92700f0fba64c7892d3a4296441bc7c

The only debug message I actually see after reverting the patch you're
commenting on is:
** Message: g_dbus_proxy_set_property_watch() success

Cheers

  reply	other threads:[~2017-09-20 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 12:54 [PATCH 1/2] hostname: Add more debug in soft failure cases Bastien Nocera
2017-09-20 12:54 ` [PATCH 2/2] hostname: Fix "BlueZ 5.XX" adapter name on startup Bastien Nocera
2017-09-20 15:48   ` Marcel Holtmann
2017-09-20 16:35     ` Bastien Nocera [this message]
2017-09-20 16:59       ` Marcel Holtmann
2017-09-20 18:57         ` Luiz Augusto von Dentz
2017-09-22 13:13           ` Bastien Nocera
2017-10-05 15:40             ` Bastien Nocera
2017-11-28  9:45             ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505925333.9350.7.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).