* [PATCH BlueZ] obexd: support to reply folder name to store file
@ 2023-03-23 3:22 Aaron_shen
2023-03-23 4:52 ` [BlueZ] " bluez.test.bot
0 siblings, 1 reply; 3+ messages in thread
From: Aaron_shen @ 2023-03-23 3:22 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Aaron_shen
It is more convenient that agent reply the message with
folder name instead of the full new filename to be store.
Because the opp_chkput() will use the remote device filename
if the new filename is NULL.
---
doc/obex-agent-api.txt | 9 +++++----
obexd/src/manager.c | 10 ++++++----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/doc/obex-agent-api.txt b/doc/obex-agent-api.txt
index 3923da6df..4e6d493d3 100644
--- a/doc/obex-agent-api.txt
+++ b/doc/obex-agent-api.txt
@@ -46,10 +46,11 @@ Methods void Release()
This method gets called when the service daemon
needs to accept/reject a Bluetooth object push request.
- Returns the full path (including the filename) where
- the object shall be stored. The tranfer object will
- contain a Filename property that contains the default
- location and name that can be returned.
+ Returns the full path (including the filename) or
+ directory name suffixed with '\' where the object
+ shall be stored. The transfer object will contain a
+ Filename property that contains the default location
+ and name that can be returned.
Possible errors: org.bluez.obex.Error.Rejected
org.bluez.obex.Error.Canceled
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index 849928603..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);
@@ -651,7 +650,10 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
agent->new_name = g_strdup(name);
agent->new_folder = NULL;
} else {
- agent->new_name = g_strdup(slash + 1);
+ if (strlen(slash) == 1)
+ agent->new_name = NULL;
+ else
+ agent->new_name = g_strdup(slash + 1);
agent->new_folder = g_strndup(name, slash - name);
}
}
@@ -722,7 +724,7 @@ int manager_request_authorization(struct obex_transfer *transfer,
dbus_pending_call_unref(call);
- if (!agent || !agent->new_name || agent->auth_reject)
+ if (!agent || agent->auth_reject)
return -EPERM;
*new_folder = agent->new_folder;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] obexd: support to reply folder name to store file
2023-03-23 3:22 [PATCH BlueZ] obexd: support to reply folder name to store file Aaron_shen
@ 2023-03-23 4:52 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-03-23 4:52 UTC (permalink / raw)
To: linux-bluetooth, aarongt.shen
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
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=732954
---Test result---
Test Summary:
CheckPatch PASS 0.48 seconds
GitLint PASS 0.30 seconds
BuildEll PASS 33.71 seconds
BluezMake PASS 1137.01 seconds
MakeCheck PASS 13.05 seconds
MakeDistcheck PASS 184.67 seconds
CheckValgrind PASS 302.31 seconds
CheckSmatch PASS 418.70 seconds
bluezmakeextell PASS 123.20 seconds
IncrementalBuild PASS 938.93 seconds
ScanBuild PASS 1334.36 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [BlueZ] obexd: support to reply folder name to store file
2023-03-23 3:48 [PATCH BlueZ] " Aaron_shen
@ 2023-03-23 5:09 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-03-23 5:09 UTC (permalink / raw)
To: linux-bluetooth, aarongt.shen
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
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=732965
---Test result---
Test Summary:
CheckPatch PASS 0.41 seconds
GitLint PASS 0.28 seconds
BuildEll PASS 26.01 seconds
BluezMake PASS 739.19 seconds
MakeCheck PASS 11.07 seconds
MakeDistcheck PASS 147.25 seconds
CheckValgrind PASS 239.63 seconds
CheckSmatch PASS 318.79 seconds
bluezmakeextell PASS 96.17 seconds
IncrementalBuild PASS 599.97 seconds
ScanBuild PASS 947.07 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-23 5:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 3:22 [PATCH BlueZ] obexd: support to reply folder name to store file Aaron_shen
2023-03-23 4:52 ` [BlueZ] " bluez.test.bot
-- strict thread matches above, loose matches on Subject: below --
2023-03-23 3:48 [PATCH BlueZ] " Aaron_shen
2023-03-23 5:09 ` [BlueZ] " bluez.test.bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.