diff mbox series

[BlueZ,1/2] gatt-api: Add error code ReadValue/WriteValue

Message ID 20220825200758.1645136-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit ea903d12068092abfc380f0c78274e4608ff2bf8
Headers show
Series [BlueZ,1/2] gatt-api: Add error code ReadValue/WriteValue | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/incremental_build success Pass
tedd_an/scan_build warning Scan-Build: src/gatt-database.c:1138:10: warning: Value stored to 'bits' during its initialization is never read uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING, ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/gatt-database.c:3535:14: warning: Value stored to 'iface' during its initialization is never read const char *iface = g_dbus_proxy_get_interface(proxy); ^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/gatt-database.c:3536:14: warning: Value stored to 'path' during its initialization is never read const char *path = g_dbus_proxy_get_path(proxy); ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings generated.

Commit Message

Luiz Augusto von Dentz Aug. 25, 2022, 8:07 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This allows application to return error codes in the range allowed by
the spec:

 'GATT - Section 4.9.5:

  Application Error 0x80 – 0x9F Application error code defined by a
  higher layer specification.'
---
 doc/gatt-api.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 25, 2022, 9:09 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=671211

---Test result---

Test Summary:
CheckPatch                    PASS      2.27 seconds
GitLint                       PASS      1.61 seconds
Prep - Setup ELL              PASS      26.73 seconds
Build - Prep                  PASS      0.73 seconds
Build - Configure             PASS      8.39 seconds
Build - Make                  PASS      969.49 seconds
Make Check                    PASS      11.87 seconds
Make Check w/Valgrind         PASS      286.82 seconds
Make Distcheck                PASS      235.16 seconds
Build w/ext ELL - Configure   PASS      8.64 seconds
Build w/ext ELL - Make        PASS      82.00 seconds
Incremental Build w/ patches  PASS      194.44 seconds
Scan Build                    WARNING   491.96 seconds

Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
src/gatt-database.c:1138:10: warning: Value stored to 'bits' during its initialization is never read
        uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING,
                ^~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gatt-database.c:3535:14: warning: Value stored to 'iface' during its initialization is never read
        const char *iface = g_dbus_proxy_get_interface(proxy);
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gatt-database.c:3536:14: warning: Value stored to 'path' during its initialization is never read
        const char *path = g_dbus_proxy_get_path(proxy);
                    ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 29, 2022, 7:50 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 25 Aug 2022 13:07:57 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This allows application to return error codes in the range allowed by
> the spec:
> 
>  'GATT - Section 4.9.5:
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/2] gatt-api: Add error code ReadValue/WriteValue
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ea903d120680
  - [BlueZ,2/2] gatt: Parse error message
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6b8f9fbd5bb8

You are awesome, thank you!
diff mbox series

Patch

diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
index af0aa761d0a2..5042c54704e4 100644
--- a/doc/gatt-api.txt
+++ b/doc/gatt-api.txt
@@ -79,13 +79,15 @@  Methods		array{byte} ReadValue(dict options)
 					  "mtu": Exchanged MTU (Server only)
 					  "device": Object Device (Server only)
 
-			Possible Errors: org.bluez.Error.Failed
+			Possible Errors: org.bluez.Error.Failed(string ecode)
 					 org.bluez.Error.InProgress
 					 org.bluez.Error.NotPermitted
 					 org.bluez.Error.NotAuthorized
 					 org.bluez.Error.InvalidOffset
 					 org.bluez.Error.NotSupported
 
+			Possible Error Code: string 0x80 - 0x9f
+
 		void WriteValue(array{byte} value, dict options)
 
 			Issues a request to write the value of the
@@ -105,13 +107,15 @@  Methods		array{byte} ReadValue(dict options)
 							       authorization
 							       request
 
-			Possible Errors: org.bluez.Error.Failed
+			Possible Errors: org.bluez.Error.Failed(string ecode)
 					 org.bluez.Error.InProgress
 					 org.bluez.Error.NotPermitted
 					 org.bluez.Error.InvalidValueLength
 					 org.bluez.Error.NotAuthorized
 					 org.bluez.Error.NotSupported
 
+			Possible Error Code: string 0x80 - 0x9f
+
 		fd, uint16 AcquireWrite(dict options) [optional]
 
 			Acquire file descriptor and MTU for writing. Only