linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/3] shared/gatt-client: Fix not checking ATT error properly
Date: Thu,  1 Dec 2016 22:40:28 +0200	[thread overview]
Message-ID: <20161201204030.27626-1-luiz.dentz@gmail.com> (raw)

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 src/shared/gatt-client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 4386692..c4102dd 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -1052,7 +1052,7 @@ static void discover_primary_cb(bool success, uint8_t att_ecode,
 					"Primary service discovery failed."
 					" ATT ECODE: 0x%02x", att_ecode);
 		/* Reset error in case of not found */
-		if (BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND) {
+		if (att_ecode == BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND) {
 			success = true;
 			att_ecode = 0;
 		}
-- 
2.9.3


             reply	other threads:[~2016-12-01 20:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01 20:40 Luiz Augusto von Dentz [this message]
2016-12-01 20:40 ` [PATCH BlueZ 2/3] shared/gatt-db: Make gatt_db_clear call gatt_db_clear_range Luiz Augusto von Dentz
2016-12-01 20:40 ` [PATCH BlueZ 3/3] shared/gatt-client: Don't clear db in case of errors Luiz Augusto von Dentz
2016-12-02 11:54 ` [PATCH BlueZ 1/3] shared/gatt-client: Fix not checking ATT error properly Luiz Augusto von Dentz

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=20161201204030.27626-1-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.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;
as well as URLs for NNTP newsgroup(s).