summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-01-17 10:39:37 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-01-17 10:39:37 +0000
commit49fe626b5c153e4bc6a174982a89e9b3b2e4baf2 (patch)
treec8e7bb82163e2fbe728f2ecd9101f58440e5532d
parent42e0ce5b430ac5e36c0d21bdddcaf1fe83e025f5 (diff)
Add support for setting the record handle on service registration
-rw-r--r--src/sdp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sdp.c b/src/sdp.c
index 0421e699..2510ccf3 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -2411,6 +2411,11 @@ int sdp_device_record_register(sdp_session_t *session, bdaddr_t *device, sdp_rec
errno = ENOMEM;
goto end;
}
+ if (rec->handle && rec->handle != 0xffffffff) {
+ uint32_t handle = rec->handle;
+ sdp_data_t *data = sdp_data_alloc(SDP_UINT32, &handle);
+ sdp_attr_replace(rec, SDP_ATTR_RECORD_HANDLE, data);
+ }
reqhdr = (sdp_pdu_hdr_t *)req;
reqhdr->pdu_id = SDP_SVC_REGISTER_REQ;
reqhdr->tid = htons(sdp_gen_tid(session));