From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 3/3] client/transfer: Add proper message to errors
Date: Thu, 8 Aug 2013 16:49:09 +0300 [thread overview]
Message-ID: <1375969749-2097-3-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1375969749-2097-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This improve the error message when a transfer fails by using
g_obex_strerror to decode the response code to a human readable string.
---
obexd/client/transfer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c
index 4b1def3..2e8f7c7 100644
--- a/obexd/client/transfer.c
+++ b/obexd/client/transfer.c
@@ -596,8 +596,8 @@ static void get_xfer_progress_first(GObex *obex, GError *err, GObexPacket *rsp,
rspcode = g_obex_packet_get_operation(rsp, &final);
if (rspcode != G_OBEX_RSP_SUCCESS && rspcode != G_OBEX_RSP_CONTINUE) {
- err = g_error_new(OBC_TRANSFER_ERROR, rspcode,
- "Transfer failed (0x%02x)", rspcode);
+ err = g_error_new(OBC_TRANSFER_ERROR, rspcode, "%s",
+ g_obex_strerror(rspcode));
xfer_complete(obex, err, transfer);
g_error_free(err);
return;
--
1.8.3.1
next prev parent reply other threads:[~2013-08-08 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 13:49 [PATCH BlueZ 1/3] gobex: Add proper message to transfer errors Luiz Augusto von Dentz
2013-08-08 13:49 ` [PATCH BlueZ 2/3] gobex: Make PUT request with just filler byte to set the final bit Luiz Augusto von Dentz
2013-08-08 13:49 ` Luiz Augusto von Dentz [this message]
2013-08-12 10:53 ` [PATCH BlueZ 1/3] gobex: Add proper message to transfer errors Luiz Augusto von Dentz
2013-08-17 8:35 ` Rfcomm connection error while connecting from android app Tama
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=1375969749-2097-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).