linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] obexd: Fix cann't receive small files sent by windows
@ 2022-03-23  3:36 xinpeng wang
  2022-03-23  4:54 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: xinpeng wang @ 2022-03-23  3:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: xinpeng wang

Windows devices use streaming mode to send files. If a small file is
sent,the first time processing data will be completed successfully,
and the transfer_complete function will be called before the end to
clear os->path.At this time, the dbus signal is still pending, and
the dbus method call requesting the file path has not been processed;
in this way, the upper-level program will not be able to obtain the
file path, resulting in failure to receive the file.
Therefore, the signal of Filename is generated, and it is forced to
be sent when status=active.

Signed-off-by: xinpeng wang <wangxinpeng@uniontech.com>
---
 obexd/src/manager.c | 5 ++++-
 obexd/src/obex.c    | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index 01741fe62..ba9ad43e6 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -533,8 +533,11 @@ void manager_emit_transfer_property(struct obex_transfer *transfer,
 void manager_emit_transfer_started(struct obex_transfer *transfer)
 {
 	transfer->status = TRANSFER_STATUS_ACTIVE;
+	if (!transfer->path)
+		return;
 
-	manager_emit_transfer_property(transfer, "Status");
+	g_dbus_emit_property_changed_full(connection, transfer->path,
+					TRANSFER_INTERFACE, "Status",G_DBUS_PROPERTY_CHANGED_FLAG_FLUSH);
 }
 
 static void emit_transfer_completed(struct obex_transfer *transfer,
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 3a68fd66c..c0d9e160a 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
@@ -720,6 +720,7 @@ int obex_put_stream_start(struct obex_session *os, const char *filename)
 		manager_emit_transfer_property(os->service_data, "Size");
 
 	os->path = g_strdup(filename);
+	manager_emit_transfer_property(os->service_data, "Filename");
 
 	return 0;
 }
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: obexd: Fix cann't receive small files sent by windows
  2022-03-23  3:36 [PATCH] obexd: Fix cann't receive small files sent by windows xinpeng wang
@ 2022-03-23  4:54 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2022-03-23  4:54 UTC (permalink / raw)
  To: linux-bluetooth, wangxinpeng

[-- Attachment #1: Type: text/plain, Size: 2325 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=625634

---Test result---

Test Summary:
CheckPatch                    FAIL      1.52 seconds
GitLint                       PASS      0.98 seconds
Prep - Setup ELL              PASS      49.12 seconds
Build - Prep                  PASS      0.76 seconds
Build - Configure             PASS      10.06 seconds
Build - Make                  PASS      1429.67 seconds
Make Check                    PASS      12.33 seconds
Make Check w/Valgrind         PASS      512.41 seconds
Make Distcheck                PASS      268.26 seconds
Build w/ext ELL - Configure   PASS      9.93 seconds
Build w/ext ELL - Make        PASS      1390.18 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
obexd: Fix cann't receive small files sent by windows
WARNING:TYPO_SPELLING: 'cann't' may be misspelled - perhaps 'can't'?
#42: 
Subject: [PATCH] obexd: Fix cann't receive small files sent by windows
                            ^^^^^^

WARNING:LONG_LINE: line length of 105 exceeds 80 columns
#83: FILE: obexd/src/manager.c:540:
+					TRANSFER_INTERFACE, "Status",G_DBUS_PROPERTY_CHANGED_FLAG_FLUSH);

ERROR:SPACING: space required after that ',' (ctx:VxV)
#83: FILE: obexd/src/manager.c:540:
+					TRANSFER_INTERFACE, "Status",G_DBUS_PROPERTY_CHANGED_FLAG_FLUSH);
 					                            ^

/github/workspace/src/12789421.patch total: 1 errors, 2 warnings, 19 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12789421.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-23  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23  3:36 [PATCH] obexd: Fix cann't receive small files sent by windows xinpeng wang
2022-03-23  4:54 ` bluez.test.bot

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