From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v2 2/3] profiles/battery: Add Bluetooth LE Battery service
Date: Mon, 23 Oct 2017 17:49:14 +0200 [thread overview]
Message-ID: <1508773754.28409.4.camel@hadess.net> (raw)
In-Reply-To: <20171023154814.20607-2-hadess@hadess.net>
On Mon, 2017-10-23 at 17:48 +0200, Bastien Nocera wrote:
> Only the Battery Level characteristic was tested with a
> Microsoft Arc Touch Mouse SE.
>
> This patch however hopes to support both the Battery Level and
> the Battery Power State characteristics.
Interdiff for this one, fixing the "Connected" state not changing:
diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
index 8e967e159..ab4603de3 100644
--- a/profiles/battery/battery.c
+++ b/profiles/battery/battery.c
@@ -400,6 +400,7 @@ static void batt_reset(struct batt *batt)
batt->db = NULL;
bt_gatt_client_unregister_notify(batt->client, batt->batt_power_state_cb_id);
bt_gatt_client_unregister_notify(batt->client, batt->batt_level_cb_id);
+ bt_gatt_client_cancel_all(batt->client);
bt_gatt_client_unref(batt->client);
batt->client = NULL;
if (batt->path) {
@@ -408,6 +409,7 @@ static void batt_reset(struct batt *batt)
g_free(batt->path);
batt->path = NULL;
}
+ btd_device_unref(batt->device);
}
static gboolean property_get_battery_level(
next prev parent reply other threads:[~2017-10-23 15:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 15:48 [PATCH v2 1/3] battery: Add BT SIG reserved numbers used by Battery Service Bastien Nocera
2017-10-23 15:48 ` [PATCH v2 2/3] profiles/battery: Add Bluetooth LE Battery service Bastien Nocera
2017-10-23 15:49 ` Bastien Nocera [this message]
2017-10-23 15:48 ` [PATCH v2 3/3] profiles/battery: Remove unused bas.[ch] Bastien Nocera
2017-10-23 20:39 ` Luiz Augusto von Dentz
2017-10-23 22:13 ` Bastien Nocera
2017-10-24 7:40 ` Luiz Augusto von Dentz
2017-10-24 8:04 ` 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=1508773754.28409.4.camel@hadess.net \
--to=hadess@hadess.net \
--cc=linux-bluetooth@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.