* [PATCH BlueZ] hog-lib: Fix not able to read report_map of instances
@ 2022-05-13 1:03 Luiz Augusto von Dentz
2022-05-13 3:41 ` [BlueZ] " bluez.test.bot
2022-05-13 22:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-05-13 1:03 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If there is multiple instances the gatt_db of the instances was not
initialized causing the report_map_attr to be NULL.
Fixes: https://github.com/bluez/bluez/issues/298
---
profiles/input/hog-lib.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index e69ea1ba4..4a9c60185 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -1518,6 +1518,7 @@ static void hog_attach_instance(struct bt_hog *hog,
if (!instance)
return;
+ instance->gatt_db = gatt_db_ref(hog->gatt_db);
hog->instances = g_slist_append(hog->instances, bt_hog_ref(instance));
}
@@ -1557,6 +1558,8 @@ struct bt_hog *bt_hog_new(int fd, const char *name, uint16_t vendor,
if (!hog)
return NULL;
+ hog->gatt_db = gatt_db_ref(db);
+
if (db) {
bt_uuid_t uuid;
@@ -1573,8 +1576,6 @@ struct bt_hog *bt_hog_new(int fd, const char *name, uint16_t vendor,
hog->dis = bt_dis_new(db);
bt_dis_set_notification(hog->dis, dis_notify, hog);
}
-
- hog->gatt_db = gatt_db_ref(db);
}
return bt_hog_ref(hog);
@@ -1675,7 +1676,8 @@ static void hog_attach_hog(struct bt_hog *hog, struct gatt_primary *primary)
}
instance = bt_hog_new(hog->uhid_fd, hog->name, hog->vendor,
- hog->product, hog->version, NULL);
+ hog->product, hog->version,
+ hog->gatt_db);
if (!instance)
return;
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] hog-lib: Fix not able to read report_map of instances
2022-05-13 1:03 [PATCH BlueZ] hog-lib: Fix not able to read report_map of instances Luiz Augusto von Dentz
@ 2022-05-13 3:41 ` bluez.test.bot
2022-05-13 22:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-05-13 3:41 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=641200
---Test result---
Test Summary:
CheckPatch PASS 1.38 seconds
GitLint PASS 0.97 seconds
Prep - Setup ELL PASS 42.17 seconds
Build - Prep PASS 0.68 seconds
Build - Configure PASS 8.37 seconds
Build - Make PASS 1236.36 seconds
Make Check PASS 11.29 seconds
Make Check w/Valgrind PASS 438.89 seconds
Make Distcheck PASS 227.75 seconds
Build w/ext ELL - Configure PASS 8.65 seconds
Build w/ext ELL - Make PASS 1238.95 seconds
Incremental Build with patchesPASS 1263.53 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] hog-lib: Fix not able to read report_map of instances
2022-05-13 1:03 [PATCH BlueZ] hog-lib: Fix not able to read report_map of instances Luiz Augusto von Dentz
2022-05-13 3:41 ` [BlueZ] " bluez.test.bot
@ 2022-05-13 22:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-05-13 22:00 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 12 May 2022 18:03:59 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> If there is multiple instances the gatt_db of the instances was not
> initialized causing the report_map_attr to be NULL.
>
> Fixes: https://github.com/bluez/bluez/issues/298
>
> [...]
Here is the summary with links:
- [BlueZ] hog-lib: Fix not able to read report_map of instances
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c7955b2099dc
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-13 22:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 1:03 [PATCH BlueZ] hog-lib: Fix not able to read report_map of instances Luiz Augusto von Dentz
2022-05-13 3:41 ` [BlueZ] " bluez.test.bot
2022-05-13 22:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
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).