diff mbox series

[Bluez] obexd: agent: Use if-elseif instead of multi-if to check error message

Message ID 20230421024731.42130-1-aarongt.shen@gmail.com (mailing list archive)
State Accepted
Commit 9a0acc7984ef79e287ec9db70703405f64a79bee
Headers show
Series [Bluez] obexd: agent: Use if-elseif instead of multi-if to check error message | 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/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Guiting Shen April 21, 2023, 2:47 a.m. UTC
The obex agent will return only one error message at the same time.So
we should use if-elseif instead of multi-if to check error message which
maybe DEBUG_ERROR_NO_REPLY or OBEX_ERROR_REJECT in agent_reply().
---
 obexd/src/manager.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com April 21, 2023, 4:13 a.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=741938

---Test result---

Test Summary:
CheckPatch                    PASS      0.51 seconds
GitLint                       PASS      0.36 seconds
BuildEll                      PASS      27.08 seconds
BluezMake                     PASS      871.37 seconds
MakeCheck                     PASS      11.83 seconds
MakeDistcheck                 PASS      150.89 seconds
CheckValgrind                 PASS      248.84 seconds
CheckSmatch                   PASS      339.22 seconds
bluezmakeextell               PASS      99.80 seconds
IncrementalBuild              PASS      726.24 seconds
ScanBuild                     PASS      1046.37 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org April 21, 2023, 9:10 p.m. UTC | #2
Hello:

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

On Fri, 21 Apr 2023 10:47:31 +0800 you wrote:
> The obex agent will return only one error message at the same time.So
> we should use if-elseif instead of multi-if to check error message which
> maybe DEBUG_ERROR_NO_REPLY or OBEX_ERROR_REJECT in agent_reply().
> ---
>  obexd/src/manager.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
  - [Bluez] obexd: agent: Use if-elseif instead of multi-if to check error message
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9a0acc7984ef

You are awesome, thank you!
diff mbox series

Patch

diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index 2bb985b96..73fd6b9af 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -632,8 +632,7 @@  static void agent_reply(DBusPendingCall *call, void *user_data)
 
 		if (dbus_error_has_name(&derr, DBUS_ERROR_NO_REPLY))
 			agent_cancel();
-
-		if (dbus_error_has_name(&derr, OBEX_ERROR_REJECT))
+		else if (dbus_error_has_name(&derr, OBEX_ERROR_REJECT))
 			agent->auth_reject = TRUE;
 
 		dbus_error_free(&derr);