Re: [PATCH] Fix MTU value used on MTU exchange response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/24/2011 1:37 PM, Bruna Moreira wrote:
The new MTU value only should be applied in server side after sending
the ATT_MTU_RESP so encode the response using the old MTU value.
---
  src/attrib-server.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 62c10f4..9de4c81 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -773,9 +773,11 @@ static uint16_t write_value(struct gatt_channel *channel, uint16_t handle,
  static uint16_t mtu_exchange(struct gatt_channel *channel, uint16_t mtu,
  		uint8_t *pdu, int len)
  {
+	guint old_mtu = channel->mtu;
+
  	channel->mtu = MIN(mtu, channel->mtu);

-	return enc_mtu_resp(channel->mtu, pdu, len);
+	return enc_mtu_resp(old_mtu, pdu, len);
  }

  static void channel_disconnect(void *user_data)


I don't think this is correct. The change has us replying with our old MTU. What part of the specification justifies this change?

--
Brian Gix
bgix@xxxxxxxxxxxxxx
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux