* [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible
@ 2013-11-04 9:34 Luiz Augusto von Dentz
2013-11-04 9:34 ` [PATCH BlueZ 2/2] android: Add the missing HAVE_CONFIG_H check daemon files Luiz Augusto von Dentz
2013-11-04 10:11 ` [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Johan Hedberg
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2013-11-04 9:34 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
android/hid.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/android/hid.c b/android/hid.c
index e660552..59fc90b 100644
--- a/android/hid.c
+++ b/android/hid.c
@@ -661,12 +661,11 @@ void bt_hid_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf, uint16_t len)
static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
{
struct hid_device *dev;
- bdaddr_t dst;
+ bdaddr_t src, dst;
char address[18];
uint16_t psm;
GError *gerr = NULL;
GSList *l;
- const bdaddr_t *src = bt_adapter_get_address();
uuid_t uuid;
if (err) {
@@ -675,6 +674,7 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
}
bt_io_get(chan, &err,
+ BT_IO_OPT_SOURCE_BDADDR, &src,
BT_IO_OPT_DEST_BDADDR, &dst,
BT_IO_OPT_PSM, &psm,
BT_IO_OPT_INVALID);
@@ -699,7 +699,7 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
dev->uhid_fd = -1;
bt_string2uuid(&uuid, HID_UUID);
- if (bt_search_service(src, &dev->dst, &uuid,
+ if (bt_search_service(&src, &dev->dst, &uuid,
hid_sdp_search_cb, dev, NULL) < 0) {
error("failed to search sdp details");
hid_device_free(dev);
@@ -732,12 +732,14 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
bool bt_hid_register(GIOChannel *io, const bdaddr_t *addr)
{
GError *err = NULL;
+ const bdaddr_t *src = bt_adapter_get_address();
DBG("");
notification_io = g_io_channel_ref(io);
ctrl_io = bt_io_listen(connect_cb, NULL, NULL, NULL, &err,
+ BT_IO_OPT_SOURCE_BDADDR, &src,
BT_IO_OPT_PSM, L2CAP_PSM_HIDP_CTRL,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);
@@ -748,6 +750,7 @@ bool bt_hid_register(GIOChannel *io, const bdaddr_t *addr)
}
intr_io = bt_io_listen(connect_cb, NULL, NULL, NULL, &err,
+ BT_IO_OPT_SOURCE_BDADDR, &src,
BT_IO_OPT_PSM, L2CAP_PSM_HIDP_INTR,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH BlueZ 2/2] android: Add the missing HAVE_CONFIG_H check daemon files
2013-11-04 9:34 [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Luiz Augusto von Dentz
@ 2013-11-04 9:34 ` Luiz Augusto von Dentz
2013-11-04 10:11 ` [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2013-11-04 9:34 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
android/hid.c | 4 ++++
android/ipc.c | 4 ++++
android/socket.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/android/hid.c b/android/hid.c
index 59fc90b..1ee8ed4 100644
--- a/android/hid.c
+++ b/android/hid.c
@@ -21,6 +21,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
diff --git a/android/ipc.c b/android/ipc.c
index 1f52753..e672bf8 100644
--- a/android/ipc.c
+++ b/android/ipc.c
@@ -21,6 +21,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stddef.h>
#include <errno.h>
#include <stdint.h>
diff --git a/android/socket.c b/android/socket.c
index b6eed6e..e32be46 100644
--- a/android/socket.c
+++ b/android/socket.c
@@ -21,6 +21,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <glib.h>
#include <stdbool.h>
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible
2013-11-04 9:34 [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Luiz Augusto von Dentz
2013-11-04 9:34 ` [PATCH BlueZ 2/2] android: Add the missing HAVE_CONFIG_H check daemon files Luiz Augusto von Dentz
@ 2013-11-04 10:11 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-11-04 10:11 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Mon, Nov 04, 2013, Luiz Augusto von Dentz wrote:
> ---
> android/hid.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Both patches have been applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-04 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-04 9:34 [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Luiz Augusto von Dentz
2013-11-04 9:34 ` [PATCH BlueZ 2/2] android: Add the missing HAVE_CONFIG_H check daemon files Luiz Augusto von Dentz
2013-11-04 10:11 ` [PATCH BlueZ 1/2] android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox