From: Biman Paul <biman.innovative@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Biman Paul <biman.paul@samsung.com>,
Syam Sidhardhan <s.syam@samsung.com>
Subject: Re: [PATCH 2/2] tools/btgatt-client: print error string and code
Date: Sun, 20 May 2018 19:58:29 +0530 [thread overview]
Message-ID: <8065cdde-e6d9-48a6-abb4-56f9ee8efae9@gmail.com> (raw)
In-Reply-To: <1499438042-4741-2-git-send-email-biman.paul@samsung.com>
Ping
On Friday 07 July 2017 08:04 PM, Biman Paul wrote:
> It is difficult to remember each and every error code.
> Printing the error string reduces some effort to refer
> error codes and their meaning every time.
> ---
> tools/btgatt-client.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
> index 51bc362..2fb1a31 100644
> --- a/tools/btgatt-client.c
> +++ b/tools/btgatt-client.c
> @@ -365,8 +365,8 @@ static void ready_cb(bool success, uint8_t att_ecode, void *user_data)
> struct client *cli = user_data;
>
> if (!success) {
> - PRLOG("GATT discovery procedures failed - error code: 0x%02x\n",
> - att_ecode);
> + PRLOG("GATT discovery procedures failed: %s (0x%02x)\n",
> + ecode_to_string(att_ecode), att_ecode);
> return;
> }
>
> @@ -480,7 +480,8 @@ static void read_multiple_cb(bool success, uint8_t att_ecode,
> int i;
>
> if (!success) {
> - PRLOG("\nRead multiple request failed: 0x%02x\n", att_ecode);
> + PRLOG("\nRead multiple request failed: %s (0x%02x)\n",
> + ecode_to_string(att_ecode), att_ecode);
> return;
> }
>
> @@ -1109,8 +1110,8 @@ static void notify_cb(uint16_t value_handle, const uint8_t *value,
> static void register_notify_cb(uint16_t att_ecode, void *user_data)
> {
> if (att_ecode) {
> - PRLOG("Failed to register notify handler "
> - "- error code: 0x%02x\n", att_ecode);
> + PRLOG("Failed to register notify handler: %s (0x%02x)\n",
> + ecode_to_string(att_ecode), att_ecode);
> return;
> }
>
prev parent reply other threads:[~2018-05-20 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170707142624epcas1p1acf47103a81eb92fe612a1d2ab4bf55a@epcas1p1.samsung.com>
2017-07-07 14:34 ` [PATCH 1/2] gatttool: add prepare write request Biman Paul
[not found] ` <CGME20170707142625epcas5p3f3cb0fdf883a357af4bca919ff5c52fb@epcas5p3.samsung.com>
2017-07-07 14:34 ` [PATCH 2/2] tools/btgatt-client: print error string and code Biman Paul
2018-05-20 14:28 ` Biman Paul [this message]
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=8065cdde-e6d9-48a6-abb4-56f9ee8efae9@gmail.com \
--to=biman.innovative@gmail.com \
--cc=biman.paul@samsung.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=s.syam@samsung.com \
/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).