Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2 1/1] Makes extract_svclass_uuid function public
@ 2010-05-13 15:08 Elvis Pfützenreuter
  2010-05-17 13:13 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Elvis Pfützenreuter @ 2010-05-13 15:08 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: epx

This patch makes the extract_svclass_uuid function public,
so it may be used by applications that link to libbluetooth.
---
 lib/sdp.c     |    8 ++++----
 lib/sdp_lib.h |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index aa22c63..fb8ccdc 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -591,7 +591,7 @@ sdp_data_t *sdp_seq_alloc(void **dtds, void **values, int len)
 	return sdp_data_alloc(SDP_SEQ8, seq);
 }
 
-static void extract_svclass_uuid(sdp_data_t *data, uuid_t *uuid)
+void sdp_extract_svclass_uuid(sdp_data_t *data, uuid_t *uuid)
 {
 	sdp_data_t *d;
 
@@ -619,7 +619,7 @@ int sdp_attr_add(sdp_record_t *rec, uint16_t attr, sdp_data_t *d)
 	rec->attrlist = sdp_list_insert_sorted(rec->attrlist, d, sdp_attrid_comp_func);
 
 	if (attr == SDP_ATTR_SVCLASS_ID_LIST)
-		extract_svclass_uuid(d, &rec->svclass);
+		sdp_extract_svclass_uuid(d, &rec->svclass);
 
 	return 0;
 }
@@ -978,7 +978,7 @@ void sdp_attr_replace(sdp_record_t *rec, uint16_t attr, sdp_data_t *d)
 	rec->attrlist = sdp_list_insert_sorted(rec->attrlist, d, sdp_attrid_comp_func);
 
 	if (attr == SDP_ATTR_SVCLASS_ID_LIST)
-		extract_svclass_uuid(d, &rec->svclass);
+		sdp_extract_svclass_uuid(d, &rec->svclass);
 }
 
 int sdp_attrid_comp_func(const void *key1, const void *key2)
@@ -1478,7 +1478,7 @@ sdp_record_t *sdp_extract_pdu(const uint8_t *buf, int bufsize, int *scanned)
 			rec->handle = data->val.uint32;
 
 		if (attr == SDP_ATTR_SVCLASS_ID_LIST)
-			extract_svclass_uuid(data, &rec->svclass);
+			sdp_extract_svclass_uuid(data, &rec->svclass);
 
 		extracted += n;
 		p += n;
diff --git a/lib/sdp_lib.h b/lib/sdp_lib.h
index e506ac1..3d70f0e 100644
--- a/lib/sdp_lib.h
+++ b/lib/sdp_lib.h
@@ -167,6 +167,7 @@ sdp_data_t *sdp_seq_alloc(void **dtds, void **values, int len);
 sdp_data_t *sdp_seq_alloc_with_length(void **dtds, void **values, int *length, int len);
 sdp_data_t *sdp_seq_append(sdp_data_t *seq, sdp_data_t *data);
 
+void sdp_extract_svclass_uuid(sdp_data_t *data, uuid_t *uuid);
 int sdp_attr_add(sdp_record_t *rec, uint16_t attr, sdp_data_t *data);
 void sdp_attr_remove(sdp_record_t *rec, uint16_t attr);
 void sdp_attr_replace(sdp_record_t *rec, uint16_t attr, sdp_data_t *data);
-- 
1.7.0.4


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

* Re: [PATCH v2 1/1] Makes extract_svclass_uuid function public
  2010-05-13 15:08 [PATCH v2 1/1] Makes extract_svclass_uuid function public Elvis Pfützenreuter
@ 2010-05-17 13:13 ` Marcel Holtmann
  2010-05-17 13:24   ` Elvis Pfützenreuter
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2010-05-17 13:13 UTC (permalink / raw)
  To: Elvis Pfützenreuter; +Cc: linux-bluetooth

Hi Elvis,

> This patch makes the extract_svclass_uuid function public,
> so it may be used by applications that link to libbluetooth.

I really like to see how you are planning to use this function. It is
not a problem to make it public, but I am concerned you might be
misusing it.

Regards

Marcel



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

* Re: [PATCH v2 1/1] Makes extract_svclass_uuid function public
  2010-05-17 13:13 ` Marcel Holtmann
@ 2010-05-17 13:24   ` Elvis Pfützenreuter
  0 siblings, 0 replies; 3+ messages in thread
From: Elvis Pfützenreuter @ 2010-05-17 13:24 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Indeed I was. sdp_get_service_classes returns a list of UUIDs already, =
so no need to extract.=20

On 17/05/2010, at 10:13, Marcel Holtmann wrote:

> Hi Elvis,
>=20
>> This patch makes the extract_svclass_uuid function public,
>> so it may be used by applications that link to libbluetooth.
>=20
> I really like to see how you are planning to use this function. It is
> not a problem to make it public, but I am concerned you might be
> misusing it.
>=20
> Regards
>=20
> Marcel
>=20
>=20

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

end of thread, other threads:[~2010-05-17 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 15:08 [PATCH v2 1/1] Makes extract_svclass_uuid function public Elvis Pfützenreuter
2010-05-17 13:13 ` Marcel Holtmann
2010-05-17 13:24   ` Elvis Pfützenreuter

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