Thread (3 messages) 3 messages, 1 author, 2016-07-28

Re: [PATCH BlueZ] Fix obex protocol for powerpc

flat view

From: Fabien PRORIOL <hidden>
Date: 2016-07-28 14:00:43

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:
quoted hunk ↗ jump to hunk
From: Fabien Proriol <redacted>

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);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help