linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] isotest: Fix not handling 0 length packets
@ 2024-01-23 15:28 Luiz Augusto von Dentz
  2024-01-23 16:32 ` [BlueZ,v1] " bluez.test.bot
  2024-01-23 18:41 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-01-23 15:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

It is in fact possible to receive 0 length packets since that probably
means their status is not sucess.
---
 tools/isotest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/isotest.c b/tools/isotest.c
index 771d24b6d2a6..7e875fa58b15 100644
--- a/tools/isotest.c
+++ b/tools/isotest.c
@@ -642,7 +642,7 @@ static void dump_mode(int fd, int sk, char *peer)
 	}
 
 	syslog(LOG_INFO, "Receiving ...");
-	while ((len = read(sk, buf, data_size)) > 0) {
+	while ((len = read(sk, buf, data_size)) >= 0) {
 		if (fd >= 0) {
 			len = write(fd, buf, len);
 			if (len < 0) {
@@ -680,7 +680,7 @@ static void recv_mode(int fd, int sk, char *peer)
 			int r;
 
 			r = recv(sk, buf, data_size, 0);
-			if (r <= 0) {
+			if (r < 0) {
 				if (r < 0)
 					syslog(LOG_ERR, "Read failed: %s (%d)",
 							strerror(errno), errno);
-- 
2.43.0


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

* RE: [BlueZ,v1] isotest: Fix not handling 0 length packets
  2024-01-23 15:28 Luiz Augusto von Dentz
@ 2024-01-23 16:32 ` bluez.test.bot
  0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-01-23 16:32 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

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

---Test result---

Test Summary:
CheckPatch                    FAIL      0.67 seconds
GitLint                       PASS      0.28 seconds
BuildEll                      PASS      24.13 seconds
BluezMake                     PASS      742.53 seconds
MakeCheck                     PASS      11.46 seconds
MakeDistcheck                 PASS      161.37 seconds
CheckValgrind                 PASS      222.53 seconds
CheckSmatch                   PASS      342.82 seconds
bluezmakeextell               PASS      114.90 seconds
IncrementalBuild              PASS      695.80 seconds
ScanBuild                     PASS      942.32 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1] isotest: Fix not handling 0 length packets
WARNING:TYPO_SPELLING: 'sucess' may be misspelled - perhaps 'success'?
#92: 
means their status is not sucess.
                          ^^^^^^

/github/workspace/src/src/13527606.patch total: 0 errors, 1 warnings, 16 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/src/13527606.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] 4+ messages in thread

* RE: [BlueZ,v1] isotest: Fix not handling 0 length packets
  2024-01-23 15:28 [PATCH BlueZ v1] isotest: Fix not handling 0 length packets Luiz Augusto von Dentz
@ 2024-01-23 16:32 ` bluez.test.bot
  2024-01-23 18:41 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-01-23 16:32 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

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

---Test result---

Test Summary:
CheckPatch                    FAIL      0.61 seconds
GitLint                       PASS      0.23 seconds
BuildEll                      PASS      24.01 seconds
BluezMake                     PASS      720.96 seconds
MakeCheck                     PASS      11.97 seconds
MakeDistcheck                 PASS      166.30 seconds
CheckValgrind                 PASS      228.76 seconds
CheckSmatch                   PASS      344.76 seconds
bluezmakeextell               PASS      112.21 seconds
IncrementalBuild              PASS      690.32 seconds
ScanBuild                     PASS      955.84 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1] isotest: Fix not handling 0 length packets
WARNING:TYPO_SPELLING: 'sucess' may be misspelled - perhaps 'success'?
#92: 
means their status is not sucess.
                          ^^^^^^

/github/workspace/src/src/13527607.patch total: 0 errors, 1 warnings, 16 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/src/13527607.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] 4+ messages in thread

* Re: [PATCH BlueZ v1] isotest: Fix not handling 0 length packets
  2024-01-23 15:28 [PATCH BlueZ v1] isotest: Fix not handling 0 length packets Luiz Augusto von Dentz
  2024-01-23 16:32 ` [BlueZ,v1] " bluez.test.bot
@ 2024-01-23 18:41 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-01-23 18:41 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Tue, 23 Jan 2024 10:28:50 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> It is in fact possible to receive 0 length packets since that probably
> means their status is not sucess.
> ---
>  tools/isotest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [BlueZ,v1] isotest: Fix not handling 0 length packets
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=eb057846cf03

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-01-23 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 15:28 [PATCH BlueZ v1] isotest: Fix not handling 0 length packets Luiz Augusto von Dentz
2024-01-23 16:32 ` [BlueZ,v1] " bluez.test.bot
2024-01-23 18:41 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2024-01-23 15:28 Luiz Augusto von Dentz
2024-01-23 16:32 ` [BlueZ,v1] " 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).