2016-07-26 13:22:48

by Fabien PRORIOL

[permalink] [raw]
Subject: [PATCH BlueZ] Fix obex protocol for powerpc

From: Fabien Proriol <[email protected]>

omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
But in connect_event, in file bluetooth.c, variables are define as int (32bit in powerpc).
When we use a platform with big endian, the result is omtu and imtu pass to obex_server_new_connection is bigger than needed.
And file transfert will be lock until timeout (for file with size > 630 bytes)

Fabien Proriol (1):
Fix obex protocol for powerpc

obexd/plugins/bluetooth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--
2.7.3


2016-07-26 13:22:49

by Fabien PRORIOL

[permalink] [raw]
Subject: [PATCH BlueZ] Fix obex protocol for powerpc

From: Fabien Proriol <[email protected]>

omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).

Signed-off-by: Fabien Proriol <[email protected]>
---
obexd/plugins/bluetooth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/obexd/plugins/bluetooth.c b/obexd/plugins/bluetooth.c
index d8b872a..3ee5432 100644
--- a/obexd/plugins/bluetooth.c
+++ b/obexd/plugins/bluetooth.c
@@ -75,8 +75,8 @@ static void connect_event(GIOChannel *io, GError *err, void *user_data)
struct bluetooth_profile *profile = user_data;
struct obex_server *server = profile->server;
int type;
- int omtu = BT_TX_MTU;
- int imtu = BT_RX_MTU;
+ uint16_t omtu = BT_TX_MTU;
+ uint16_t imtu = BT_RX_MTU;
gboolean stream = TRUE;
socklen_t len = sizeof(int);

--
2.7.3