Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcin Kraglak <marcin.kraglak@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/3] android/gatt: Set length to READ_INIT before read request
Date: Fri, 16 May 2014 10:37:38 +0200	[thread overview]
Message-ID: <1400229459-21617-2-git-send-email-marcin.kraglak@tieto.com> (raw)
In-Reply-To: <1400229459-21617-1-git-send-email-marcin.kraglak@tieto.com>

It is needed while we pass read request to framework.
---
 android/gatt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index 2a2e649..f2fd17d 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -4337,6 +4337,7 @@ static uint8_t read_by_type(const uint8_t *cmd, uint16_t cmd_len,
 			return ATT_ECODE_INSUFF_RESOURCES;
 		}
 
+		data->length = READ_INIT;
 		data->handle = handle;
 		queue_push_tail(device->pending_requests, data);
 	}
@@ -4550,6 +4551,7 @@ static uint8_t find_by_type_request(const uint8_t *cmd, uint16_t cmd_len,
 			return ATT_ECODE_INSUFF_RESOURCES;
 		}
 
+		data->length = READ_INIT;
 		data->handle = handle;
 		data->filter_vlen = search_vlen;
 		memcpy(data->filter_value, search_value, search_vlen);
-- 
1.9.0


  reply	other threads:[~2014-05-16  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  8:37 [PATCH 1/3] android/gatt: Fix reading attribute value Marcin Kraglak
2014-05-16  8:37 ` Marcin Kraglak [this message]
2014-05-16  8:37 ` [PATCH 3/3] android/gatt: Don't try send responses after process_dev_pending_req() Marcin Kraglak
2014-05-16  8:45 ` [PATCH 1/3] android/gatt: Fix reading attribute value Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400229459-21617-2-git-send-email-marcin.kraglak@tieto.com \
    --to=marcin.kraglak@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox