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
Hi Anderson,
On Mon, Feb 17, 2014 at 1:55 PM, Anderson Lizardo
<[email protected]> wrote:
> Hi,
>
> On Fri, Feb 7, 2014 at 4:14 PM, Anderson Lizardo
> <[email protected]> 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
Hi,
On Fri, Feb 7, 2014 at 4:14 PM, Anderson Lizardo
<[email protected]> 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
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
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