linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "Pali Rohár" <pali@kernel.org>
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 09:44:50 -0700	[thread overview]
Message-ID: <CABBYNZ+whHfHr27X8RgBpYv1980itzwTQmO03oR=DJDbgx78tQ@mail.gmail.com> (raw)
In-Reply-To: <20200426210247.757-1-pali@kernel.org>

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.

>                                 return dbus_message_new_method_return(msg);
>                         else
> --
> 2.20.1
>


-- 
Luiz Augusto von Dentz

  parent reply	other threads:[~2020-04-27 16:45 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 ` Luiz Augusto von Dentz [this message]
2020-04-27 18:14   ` [PATCH] " Pali Rohár
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='CABBYNZ+whHfHr27X8RgBpYv1980itzwTQmO03oR=DJDbgx78tQ@mail.gmail.com' \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=pali@kernel.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).