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( -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html