summaryrefslogtreecommitdiffstats
path: root/sdpd/service.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-24 01:21:33 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-24 01:21:33 +0000
commiteb4d49890ca8a4d8f567e81fdf82b6903d30f326 (patch)
treee6b410172659468ab6ea07a89e373a24dbb9c55f /sdpd/service.c
parent853c689f23985da36de72d8c4be33f64fc00496d (diff)
Move the extended inquiry response creation into the SDP code
Diffstat (limited to 'sdpd/service.c')
-rw-r--r--sdpd/service.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sdpd/service.c b/sdpd/service.c
index 7f8296f4..bbc7fcc8 100644
--- a/sdpd/service.c
+++ b/sdpd/service.c
@@ -139,6 +139,23 @@ void set_service_classes_callback(service_classes_callback_t callback)
service_classes_callback = callback;
}
+void create_ext_inquiry_response(const char *name, uint8_t *data)
+{
+ if (name) {
+ int len = strlen(name);
+
+ if (len > 48) {
+ len = 48;
+ data[1] = 0x08;
+ } else
+ data[1] = 0x09;
+
+ data[0] = len + 1;
+
+ memcpy(data + 2, name, len);
+ }
+}
+
void register_public_browse_group(void)
{
sdp_list_t *browselist;