All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP
@ 2014-02-07 20:14 Anderson Lizardo
  2014-02-07 20:14 ` [PATCH BlueZ 2/3] tools/sdptool: Fix output formatting Anderson Lizardo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anderson Lizardo @ 2014-02-07 20:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

Also reorder last ID so the list remains ordered.
---
 lib/sdp.c |    3 ++-
 lib/sdp.h |    7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 3b26ec3..0a7cb6f 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -181,8 +181,9 @@ static struct tupla ServiceClass[] = {
 	{ HDP_SVCLASS_ID,			"HDP"				},
 	{ HDP_SOURCE_SVCLASS_ID,		"HDP Source"			},
 	{ HDP_SINK_SVCLASS_ID,			"HDP Sink"			},
-	{ APPLE_AGENT_SVCLASS_ID,		"Apple Agent"			},
+	{ GENERIC_ACCESS_SVCLASS_ID,		"Generic Access"		},
 	{ GENERIC_ATTRIB_SVCLASS_ID,		"Generic Attribute"		},
+	{ APPLE_AGENT_SVCLASS_ID,		"Apple Agent"			},
 	{ 0 }
 };
 
diff --git a/lib/sdp.h b/lib/sdp.h
index c6dfc27..516d75d 100644
--- a/lib/sdp.h
+++ b/lib/sdp.h
@@ -150,8 +150,9 @@ extern "C" {
 #define HDP_SVCLASS_ID			0x1400
 #define HDP_SOURCE_SVCLASS_ID		0x1401
 #define HDP_SINK_SVCLASS_ID		0x1402
-#define APPLE_AGENT_SVCLASS_ID		0x2112
+#define GENERIC_ACCESS_SVCLASS_ID	0x1800
 #define GENERIC_ATTRIB_SVCLASS_ID	0x1801
+#define APPLE_AGENT_SVCLASS_ID		0x2112
 
 /*
  * Standard profile descriptor identifiers; note these
@@ -224,9 +225,9 @@ extern "C" {
 #define HDP_PROFILE_ID			HDP_SVCLASS_ID
 #define HDP_SOURCE_PROFILE_ID		HDP_SOURCE_SVCLASS_ID
 #define HDP_SINK_PROFILE_ID		HDP_SINK_SVCLASS_ID
-#define APPLE_AGENT_PROFILE_ID		APPLE_AGENT_SVCLASS_ID
-#define GENERIC_ACCESS_PROFILE_ID	0x1800
+#define GENERIC_ACCESS_PROFILE_ID	GENERIC_ACCESS_SVCLASS_ID
 #define GENERIC_ATTRIB_PROFILE_ID	GENERIC_ATTRIB_SVCLASS_ID
+#define APPLE_AGENT_PROFILE_ID		APPLE_AGENT_SVCLASS_ID
 
 /*
  * Compatibility macros for the old MDP acronym
-- 
1.7.9.5


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

* [PATCH BlueZ 2/3] tools/sdptool: Fix output formatting
  2014-02-07 20:14 [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
@ 2014-02-07 20:14 ` Anderson Lizardo
  2014-02-07 20:14 ` [PATCH BlueZ 3/3] lib/sdp: Fix printing of multiple record fields Anderson Lizardo
  2014-02-17 11:55 ` [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
  2 siblings, 0 replies; 5+ messages in thread
From: Anderson Lizardo @ 2014-02-07 20:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

Print 8-bit and 16-bit integers with in a more readable format.
---
 tools/sdptool.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/sdptool.c b/tools/sdptool.c
index d6b7006..1600c3e 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -1048,7 +1048,7 @@ static void print_service_desc(void *value, void *user)
 			if (proto == RFCOMM_UUID)
 				printf("    Channel: %d\n", p->val.uint8);
 			else
-				printf("    uint8: 0x%x\n", p->val.uint8);
+				printf("    uint8: 0x%02x\n", p->val.uint8);
 			break;
 		case SDP_UINT16:
 			if (proto == L2CAP_UUID) {
@@ -1060,9 +1060,9 @@ static void print_service_desc(void *value, void *user)
 				if (i == 1)
 					printf("    Version: 0x%04x\n", p->val.uint16);
 				else
-					printf("    uint16: 0x%x\n", p->val.uint16);
+					printf("    uint16: 0x%04x\n", p->val.uint16);
 			else
-				printf("    uint16: 0x%x\n", p->val.uint16);
+				printf("    uint16: 0x%04x\n", p->val.uint16);
 			break;
 		case SDP_SEQ16:
 			printf("    SEQ16:");
-- 
1.7.9.5


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

* [PATCH BlueZ 3/3] lib/sdp: Fix printing of multiple record fields
  2014-02-07 20:14 [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
  2014-02-07 20:14 ` [PATCH BlueZ 2/3] tools/sdptool: Fix output formatting Anderson Lizardo
@ 2014-02-07 20:14 ` Anderson Lizardo
  2014-02-17 11:55 ` [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
  2 siblings, 0 replies; 5+ messages in thread
From: Anderson Lizardo @ 2014-02-07 20:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

If there are multiple fields to print, sdp_record_print() was missing a
newline between entries.
---
 lib/sdp.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 0a7cb6f..e5e4622 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -1605,13 +1605,13 @@ void sdp_record_print(const sdp_record_t *rec)
 {
 	sdp_data_t *d = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY);
 	if (d && SDP_IS_TEXT_STR(d->dtd))
-		printf("Service Name: %.*s", d->unitSize, d->val.str);
+		printf("Service Name: %.*s\n", d->unitSize, d->val.str);
 	d = sdp_data_get(rec, SDP_ATTR_SVCDESC_PRIMARY);
 	if (d && SDP_IS_TEXT_STR(d->dtd))
-		printf("Service Description: %.*s", d->unitSize, d->val.str);
+		printf("Service Description: %.*s\n", d->unitSize, d->val.str);
 	d = sdp_data_get(rec, SDP_ATTR_PROVNAME_PRIMARY);
 	if (d && SDP_IS_TEXT_STR(d->dtd))
-		printf("Service Provider: %.*s", d->unitSize, d->val.str);
+		printf("Service Provider: %.*s\n", d->unitSize, d->val.str);
 }
 
 #ifdef SDP_DEBUG
-- 
1.7.9.5


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

* Re: [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP
  2014-02-07 20:14 [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
  2014-02-07 20:14 ` [PATCH BlueZ 2/3] tools/sdptool: Fix output formatting Anderson Lizardo
  2014-02-07 20:14 ` [PATCH BlueZ 3/3] lib/sdp: Fix printing of multiple record fields Anderson Lizardo
@ 2014-02-17 11:55 ` Anderson Lizardo
  2014-02-21 12:33   ` Luiz Augusto von Dentz
  2 siblings, 1 reply; 5+ messages in thread
From: Anderson Lizardo @ 2014-02-17 11:55 UTC (permalink / raw)
  To: BlueZ development; +Cc: Anderson Lizardo

Hi,

On Fri, Feb 7, 2014 at 4:14 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> Also reorder last ID so the list remains ordered.
> ---
>  lib/sdp.c |    3 ++-
>  lib/sdp.h |    7 ++++---
>  2 files changed, 6 insertions(+), 4 deletions(-)

ping.

-- 
Anderson Lizardo
http://www.indt.org/?lang=en
INdT - Manaus - Brazil

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

* Re: [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP
  2014-02-17 11:55 ` [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
@ 2014-02-21 12:33   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2014-02-21 12:33 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: BlueZ development

Hi Anderson,

On Mon, Feb 17, 2014 at 1:55 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> Hi,
>
> On Fri, Feb 7, 2014 at 4:14 PM, Anderson Lizardo
> <anderson.lizardo@openbossa.org> wrote:
>> Also reorder last ID so the list remains ordered.
>> ---
>>  lib/sdp.c |    3 ++-
>>  lib/sdp.h |    7 ++++---
>>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> ping.

Pushed, thanks.

-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2014-02-21 12:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 20:14 [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
2014-02-07 20:14 ` [PATCH BlueZ 2/3] tools/sdptool: Fix output formatting Anderson Lizardo
2014-02-07 20:14 ` [PATCH BlueZ 3/3] lib/sdp: Fix printing of multiple record fields Anderson Lizardo
2014-02-17 11:55 ` [PATCH BlueZ 1/3] lib/sdp: Add missing Service Class ID for GAP Anderson Lizardo
2014-02-21 12:33   ` Luiz Augusto von Dentz

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.