2023-04-21 02:49:48

by Guiting Shen

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

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(-)

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);
--
2.34.1


2023-04-21 04:24:56

by bluez.test.bot

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

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

2023-04-21 21:12:31

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH Bluez] obexd: agent: Use if-elseif instead of multi-if to check error message

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html