summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-08-03 07:41:21 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-08-03 07:41:21 +0000
commitfb1557c4111ca9993e4927af6f65bdbf9c2fa8ec (patch)
tree10eb4d02f17d2d4a0aed5334d6ece8552ee9ed6e /src
parenta1454c0f12421da1849ca347f8a30d084778d679 (diff)
Add device specific record register
Diffstat (limited to 'src')
-rw-r--r--src/sdp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sdp.c b/src/sdp.c
index 4c1117e1..22fcd362 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -2318,8 +2318,13 @@ int sdp_device_record_register(sdp_session_t *session, bdaddr_t *device, sdp_rec
reqhdr->tid = htons(sdp_gen_tid(session));
reqsize = sizeof(sdp_pdu_hdr_t) + 1;
p = req + sizeof(sdp_pdu_hdr_t);
- *p++ = flags;
- if (0 > sdp_gen_record_pdu(rec, &pdu)) {
+ if (bacmp(device, BDADDR_ANY)) {
+ *p++ = flags | SDP_DEVICE_RECORD;
+ bacpy((bdaddr_t *) p, device);
+ p += sizeof(bdaddr_t);
+ } else
+ *p++ = flags;
+ if (sdp_gen_record_pdu(rec, &pdu) < 0) {
status = -1;
errno = ENOMEM;
goto end;