Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Create bneptest tool
@ 2015-03-12 16:06 Grzegorz Kolodziejczyk
  2015-03-12 16:06 ` [PATCH v4 1/7] profiles/network: Fix sending error in bnep server add Grzegorz Kolodziejczyk
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Grzegorz Kolodziejczyk @ 2015-03-12 16:06 UTC (permalink / raw)
  To: linux-bluetooth

v4:
- Fix error returning in bnep server add
- Reorganize bnep service comparing (by uuid, by string),
- Fixed pointed by Szymon commit message typo,
- Add support for sending general bnep frames by bneptest,
- bneptest now require bridge and iface name (it was optional-def. names were
 set)
- Update PTS results and test instructions.

Grzegorz Kolodziejczyk (7):
  profiles/network: Fix sending error in bnep server add
  profiles/network: Remove unneded bnep_uuid function from bnep code
  profiles/network: Remove not needed get name by bnep id function
  profiles/network: Move disconn cb setting to bnep connect method
  tools/bneptest: Add initial support for bneptest tool
  tools/bneptest: Add generic connect/listen functionality
  android/pts: Add BNEP PTS 6.0 results for android 5.0

 .gitignore                    |   1 +
 Makefile.tools                |  12 +-
 android/Android.mk            |  35 ++
 android/Makefile.am           |   5 +-
 android/pan.c                 |   5 +-
 android/pics-bnep.txt         |  26 ++
 android/pixit-bnep.txt        |  30 ++
 android/pts-bnep.txt          |  48 +++
 profiles/network/bnep.c       |  59 +---
 profiles/network/bnep.h       |   9 +-
 profiles/network/connection.c |  23 +-
 profiles/network/server.c     |  35 +-
 tools/bneptest.c              | 762 ++++++++++++++++++++++++++++++++++++++++++
 13 files changed, 973 insertions(+), 77 deletions(-)
 create mode 100644 android/pics-bnep.txt
 create mode 100644 android/pixit-bnep.txt
 create mode 100644 android/pts-bnep.txt
 create mode 100644 tools/bneptest.c

-- 
2.1.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH v4 1/7] profiles/network: Fix sending error in bnep server add
@ 2015-03-12 16:15 Grzegorz Kolodziejczyk
  2015-03-12 16:41 ` Szymon Janc
  0 siblings, 1 reply; 12+ messages in thread
From: Grzegorz Kolodziejczyk @ 2015-03-12 16:15 UTC (permalink / raw)
  To: linux-bluetooth

If bnep server add will not proceed successfully, approperiate error
should be returned. Now it returns error if control message send will
fail.
---
 profiles/network/bnep.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index adddc33..779c5fb 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -650,6 +650,7 @@ int bnep_server_add(int sk, char *bridge, char *iface, const bdaddr_t *addr,
 	/* Processing BNEP_SETUP_CONNECTION_REQUEST_MSG */
 	rsp = bnep_setup_decode(sk, req, &dst);
 	if (rsp != BNEP_SUCCESS) {
+		err = -rsp;
 		error("bnep: error while decoding setup connection request: %d",
 									rsp);
 		goto reply;
@@ -673,10 +674,11 @@ int bnep_server_add(int sk, char *bridge, char *iface, const bdaddr_t *addr,
 		rsp = BNEP_CONN_NOT_ALLOWED;
 
 reply:
-	err = bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp);
-	if (err < 0)
+	if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
+		err = -errno;
 		error("bnep: send ctrl rsp error: %s (%d)", strerror(errno),
 									errno);
+	}
 
 	return err;
 }
-- 
2.1.0


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

end of thread, other threads:[~2015-03-12 16:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 16:06 [PATCH v4 0/7] Create bneptest tool Grzegorz Kolodziejczyk
2015-03-12 16:06 ` [PATCH v4 1/7] profiles/network: Fix sending error in bnep server add Grzegorz Kolodziejczyk
2015-03-12 16:12   ` Szymon Janc
2015-03-12 16:06 ` [PATCH v4 2/7] profiles/network: Remove unneded bnep_uuid function from bnep code Grzegorz Kolodziejczyk
2015-03-12 16:38   ` Szymon Janc
2015-03-12 16:06 ` [PATCH v4 3/7] profiles/network: Remove not needed get name by bnep id function Grzegorz Kolodziejczyk
2015-03-12 16:06 ` [PATCH v4 4/7] profiles/network: Move disconn cb setting to bnep connect method Grzegorz Kolodziejczyk
2015-03-12 16:06 ` [PATCH v4 5/7] tools/bneptest: Add initial support for bneptest tool Grzegorz Kolodziejczyk
2015-03-12 16:06 ` [PATCH v4 6/7] tools/bneptest: Add generic connect/listen functionality Grzegorz Kolodziejczyk
2015-03-12 16:06 ` [PATCH v4 7/7] android/pts: Add BNEP PTS 6.0 results for android 5.0 Grzegorz Kolodziejczyk
  -- strict thread matches above, loose matches on Subject: below --
2015-03-12 16:15 [PATCH v4 1/7] profiles/network: Fix sending error in bnep server add Grzegorz Kolodziejczyk
2015-03-12 16:41 ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox