* [PATCH BlueZ] Fix obex protocol for powerpc
@ 2016-07-28 13:12 fabien.proriolpatch
2016-07-28 13:12 ` fabien.proriolpatch
0 siblings, 1 reply; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-28 13:12 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
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/client/bluetooth.c | 4 ++--
obexd/plugins/bluetooth.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.7.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ] Fix obex protocol for powerpc
2016-07-28 13:12 [PATCH BlueZ] Fix obex protocol for powerpc fabien.proriolpatch
@ 2016-07-28 13:12 ` fabien.proriolpatch
2016-07-28 14:00 ` Fabien PRORIOL
0 siblings, 1 reply; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-28 13:12 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
---
obexd/client/bluetooth.c | 4 ++--
obexd/plugins/bluetooth.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c
index be007de..3cc1f90 100644
--- a/obexd/client/bluetooth.c
+++ b/obexd/client/bluetooth.c
@@ -443,8 +443,8 @@ static int bluetooth_getpacketopt(GIOChannel *io, int *tx_mtu, int *rx_mtu)
{
int sk = g_io_channel_unix_get_fd(io);
int type;
- int omtu = -1;
- int imtu = -1;
+ uint16_t omtu = -1;
+ uint16_t imtu = -1;
socklen_t len = sizeof(int);
DBG("");
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH BlueZ] Fix obex protocol for powerpc
2016-07-28 13:12 ` fabien.proriolpatch
@ 2016-07-28 14:00 ` Fabien PRORIOL
0 siblings, 0 replies; 8+ messages in thread
From: Fabien PRORIOL @ 2016-07-28 14:00 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
opps, sorry, I sent this new patch a lot too quickly...
uint16_t is unsigned, and can't accept -1...
I need to rework on it
Fabien Proriol
On 28/07/2016 15:12, fabien.proriolpatch@kazoe.org wrote:
> From: Fabien Proriol <fabien.proriol@jdsu.com>
>
> omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
> ---
> obexd/client/bluetooth.c | 4 ++--
> obexd/plugins/bluetooth.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c
> index be007de..3cc1f90 100644
> --- a/obexd/client/bluetooth.c
> +++ b/obexd/client/bluetooth.c
> @@ -443,8 +443,8 @@ static int bluetooth_getpacketopt(GIOChannel *io, int *tx_mtu, int *rx_mtu)
> {
> int sk = g_io_channel_unix_get_fd(io);
> int type;
> - int omtu = -1;
> - int imtu = -1;
> + uint16_t omtu = -1;
> + uint16_t imtu = -1;
> socklen_t len = sizeof(int);
>
> DBG("");
> 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);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ] Fix obex protocol for powerpc
@ 2016-07-28 14:06 fabien.proriolpatch
2016-07-28 14:06 ` fabien.proriolpatch
0 siblings, 1 reply; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-28 14:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
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/client/bluetooth.c | 4 ++--
obexd/plugins/bluetooth.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.7.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ] Fix obex protocol for powerpc
2016-07-28 14:06 fabien.proriolpatch
@ 2016-07-28 14:06 ` fabien.proriolpatch
2016-07-29 11:02 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-28 14:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
---
obexd/client/bluetooth.c | 4 ++--
obexd/plugins/bluetooth.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c
index be007de..e35124a 100644
--- a/obexd/client/bluetooth.c
+++ b/obexd/client/bluetooth.c
@@ -443,8 +443,8 @@ static int bluetooth_getpacketopt(GIOChannel *io, int *tx_mtu, int *rx_mtu)
{
int sk = g_io_channel_unix_get_fd(io);
int type;
- int omtu = -1;
- int imtu = -1;
+ uint16_t omtu = BT_TX_MTU;
+ uint16_t imtu = BT_RX_MTU;
socklen_t len = sizeof(int);
DBG("");
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH BlueZ] Fix obex protocol for powerpc
2016-07-28 14:06 ` fabien.proriolpatch
@ 2016-07-29 11:02 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2016-07-29 11:02 UTC (permalink / raw)
To: fabien.proriolpatch; +Cc: linux-bluetooth@vger.kernel.org, Fabien Proriol
Hi Fabien,
On Thu, Jul 28, 2016 at 5:06 PM, <fabien.proriolpatch@kazoe.org> wrote:
> From: Fabien Proriol <fabien.proriol@jdsu.com>
>
> omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
> ---
> obexd/client/bluetooth.c | 4 ++--
> obexd/plugins/bluetooth.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c
> index be007de..e35124a 100644
> --- a/obexd/client/bluetooth.c
> +++ b/obexd/client/bluetooth.c
> @@ -443,8 +443,8 @@ static int bluetooth_getpacketopt(GIOChannel *io, int *tx_mtu, int *rx_mtu)
> {
> int sk = g_io_channel_unix_get_fd(io);
> int type;
> - int omtu = -1;
> - int imtu = -1;
> + uint16_t omtu = BT_TX_MTU;
> + uint16_t imtu = BT_RX_MTU;
> socklen_t len = sizeof(int);
>
> DBG("");
> 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
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ] Fix obex protocol for powerpc
@ 2016-07-26 13:22 fabien.proriolpatch
2016-07-26 13:22 ` fabien.proriolpatch
0 siblings, 1 reply; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-26 13:22 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ] Fix obex protocol for powerpc
2016-07-26 13:22 fabien.proriolpatch
@ 2016-07-26 13:22 ` fabien.proriolpatch
0 siblings, 0 replies; 8+ messages in thread
From: fabien.proriolpatch @ 2016-07-26 13:22 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Fabien Proriol
From: Fabien Proriol <fabien.proriol@jdsu.com>
omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com>
---
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-07-29 11:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28 13:12 [PATCH BlueZ] Fix obex protocol for powerpc fabien.proriolpatch
2016-07-28 13:12 ` fabien.proriolpatch
2016-07-28 14:00 ` Fabien PRORIOL
-- strict thread matches above, loose matches on Subject: below --
2016-07-28 14:06 fabien.proriolpatch
2016-07-28 14:06 ` fabien.proriolpatch
2016-07-29 11:02 ` Luiz Augusto von Dentz
2016-07-26 13:22 fabien.proriolpatch
2016-07-26 13:22 ` fabien.proriolpatch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox