public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Kraglak <marcin.kraglak@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/2] android/gatt: Set need_resp flag in when received PREP_WRITE_REQ
Date: Wed,  9 Jul 2014 10:53:53 +0200	[thread overview]
Message-ID: <1404896033-17337-2-git-send-email-marcin.kraglak@tieto.com> (raw)
In-Reply-To: <1404896033-17337-1-git-send-email-marcin.kraglak@tieto.com>

Set need_resp flag if pepare write request have been received.
This is needed because application should send response to stack.
---
 android/gatt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index cccf23e..ef831ad 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -4580,7 +4580,10 @@ static void write_cb(uint16_t handle, uint16_t offset,
 	ev->trans_id = transaction->id;
 
 	ev->is_prep = att_opcode == ATT_OP_PREP_WRITE_REQ;
-	ev->need_rsp = att_opcode == ATT_OP_WRITE_REQ;
+
+	if (att_opcode == ATT_OP_WRITE_REQ ||
+					att_opcode == ATT_OP_PREP_WRITE_REQ)
+		ev->need_rsp = true;
 
 	ev->length = len;
 	memcpy(ev->value, value, len);
-- 
1.9.3


  reply	other threads:[~2014-07-09  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  8:53 [PATCH 1/2] android/gatt: Fix sending incorrect frames Marcin Kraglak
2014-07-09  8:53 ` Marcin Kraglak [this message]
2014-07-09  9:31 ` 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=1404896033-17337-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