linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] device: Return error when ConnectProfile DBus method fails (second fix)
Date: Mon, 27 Apr 2020 20:14:50 +0200	[thread overview]
Message-ID: <20200427181450.6gpq6sy24wzr2cfc@pali> (raw)
In-Reply-To: <CABBYNZ+whHfHr27X8RgBpYv1980itzwTQmO03oR=DJDbgx78tQ@mail.gmail.com>

On Monday 27 April 2020 09:44:50 Luiz Augusto von Dentz wrote:
> Hi Pali,
> 
> On Sun, Apr 26, 2020 at 2:05 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > This is fixup of commit 3aa815a31017e8793b030b04ef704ce85455b9aa. There is
> > another place which needs to distinguish between Connect and ConnectProfile
> > DBus method.
> > ---
> >  src/device.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/device.c b/src/device.c
> > index 229579378..7b0eb256e 100644
> > --- a/src/device.c
> > +++ b/src/device.c
> > @@ -1861,7 +1861,9 @@ static DBusMessage *connect_profiles(struct btd_device *dev, uint8_t bdaddr_type
> >         dev->pending = create_pending_list(dev, uuid);
> >         if (!dev->pending) {
> >                 if (dev->svc_refreshed) {
> > -                       if (find_service_with_state(dev->services,
> > +                       if (dbus_message_is_method_call(msg, DEVICE_INTERFACE,
> > +                                                       "Connect") &&
> > +                               find_service_with_state(dev->services,
> >                                                 BTD_SERVICE_STATE_CONNECTED))
> 
> Perhaps it would be better to have a helper function that checks this for us.

I do not know if it helps, but I think this is the last problem which I
observed with connect/disconnect profile method.

> >                                 return dbus_message_new_method_return(msg);
> >                         else
> > --
> > 2.20.1
> >
> 
> 
> -- 
> Luiz Augusto von Dentz

  reply	other threads:[~2020-04-27 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 21:02 [PATCH] device: Return error when ConnectProfile DBus method fails (second fix) Pali Rohár
2020-04-26 21:06 ` bluez.test.bot
2020-04-27 16:44 ` [PATCH] " Luiz Augusto von Dentz
2020-04-27 18:14   ` Pali Rohár [this message]
2020-05-03 11:10 ` [PATCH v2] " Pali Rohár
2020-05-04 23:38   ` Luiz Augusto von Dentz

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=20200427181450.6gpq6sy24wzr2cfc@pali \
    --to=pali@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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).