From 49fe626b5c153e4bc6a174982a89e9b3b2e4baf2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 17 Jan 2006 10:39:37 +0000 Subject: Add support for setting the record handle on service registration --- src/sdp.c | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- cgit