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 3/5] core/device: Fix log when loading characteristic fails
Date: Mon, 15 Feb 2016 14:30:40 +0200	[thread overview]
Message-ID: <1455539442-31843-3-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1455539442-31843-1-git-send-email-luiz.dentz@gmail.com>

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

It should log that loading fails not saving.
---
 src/device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/device.c b/src/device.c
index 1f7c895..235145a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3012,7 +3012,7 @@ static int load_chrc(char *handle, char *value,
 							&uuid, 0, properties,
 							NULL, NULL, NULL);
 	if (!att || gatt_db_attribute_get_handle(att) != value_handle) {
-		warn("saving characteristic to db failed");
+		warn("loading characteristic to db failed");
 		return -EIO;
 	}
 
@@ -3039,13 +3039,13 @@ static int load_incl(struct gatt_db *db, char *handle, char *value,
 
 	att = gatt_db_get_attribute(db, start);
 	if (!att) {
-		warn("saving included service to db failed - no such service");
+		warn("loading included service to db failed - no such service");
 		return -EIO;
 	}
 
 	att = gatt_db_service_add_included(service, att);
 	if (!att) {
-		warn("saving included service to db failed");
+		warn("loading included service to db failed");
 		return -EIO;
 	}
 
@@ -3082,7 +3082,7 @@ static int load_service(struct gatt_db *db, char *handle, char *value)
 	att = gatt_db_insert_service(db, start, &uuid, primary,
 							end - start + 1);
 	if (!att) {
-		DBG("ERROR saving service to db!");
+		error("Unable load service into db.");
 		return -EIO;
 	}
 
-- 
2.5.0


  parent reply	other threads:[~2016-02-15 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 12:30 [PATCH BlueZ 1/5] shared/gatt-client: Add debug log if characteristic cannot be added Luiz Augusto von Dentz
2016-02-15 12:30 ` [PATCH BlueZ 2/5] shared/gatt-client: Rename tmp_queue to svcs Luiz Augusto von Dentz
2016-02-15 12:30 ` Luiz Augusto von Dentz [this message]
2016-02-15 12:30 ` [PATCH BlueZ 4/5] core/device: Fix not reseting database if attributes cannot be loaded Luiz Augusto von Dentz
2016-02-15 12:30 ` [PATCH BlueZ 5/5] core/device: Fix not clearing Attributes before storing Luiz Augusto von Dentz
2016-02-17 10:32 ` [PATCH BlueZ 1/5] shared/gatt-client: Add debug log if characteristic cannot be added 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=1455539442-31843-3-git-send-email-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).