Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sdpd newer versions of the Bluetooth Core specifica...



details:   https://anonhg.NetBSD.org/src/rev/dad8772f891d
branches:  trunk
changeset: 341824:dad8772f891d
user:      plunky <plunky%NetBSD.org@localhost>
date:      Tue Nov 24 21:11:39 2015 +0000

description:
newer versions of the Bluetooth Core specification state that
service record number values of 0x00000001->0x0000FFFF are
reserved, so comply with that here.

diffstat:

 usr.sbin/sdpd/db.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r 70feee6c2517 -r dad8772f891d usr.sbin/sdpd/db.c
--- a/usr.sbin/sdpd/db.c        Tue Nov 24 20:13:12 2015 +0000
+++ b/usr.sbin/sdpd/db.c        Tue Nov 24 21:11:39 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db.c,v 1.1 2009/05/12 10:05:06 plunky Exp $    */
+/*     $NetBSD: db.c,v 1.2 2015/11/24 21:11:39 plunky Exp $    */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: db.c,v 1.1 2009/05/12 10:05:06 plunky Exp $");
+__RCSID("$NetBSD: db.c,v 1.2 2015/11/24 21:11:39 plunky Exp $");
 
 #include <bluetooth.h>
 #include <sdp.h>
@@ -96,8 +96,8 @@
 /* BrowseGroupDescriptor service record */
 static uint8_t bgd_data[] = {
        0x09, 0x00, 0x00,       //  uint16      ServiceRecordHandle
-       0x0a, 0x00, 0x00, 0x00, //  uint32      0x00000001
-       0x01,
+       0x0a, 0x00, 0x01, 0x00, //  uint32      0x00010000
+       0x00,
 
        0x09, 0x00, 0x01,       //  uint16      ServiceClassIDList
        0x35, 0x03,             //  seq8(3)
@@ -130,11 +130,11 @@
        sdp_data_t d;
 
        LIST_INIT(&srv->rlist);
-       srv->handle = 0;
+       srv->handle = 0x00010000; /* values 0x00000001->0x0000FFFF are reserved */
 
        d.next = sds_data;
        d.end = sds_data + sizeof(sds_data);
-       if (!db_create(srv, -1, BDADDR_ANY, srv->handle++, &d))
+       if (!db_create(srv, -1, BDADDR_ANY, 0x00000000, &d))
                return false;
 
        d.next = bgd_data;



Home | Main Index | Thread Index | Old Index