From owner-freebsd-bluetooth@FreeBSD.ORG Sat Apr 18 07:52:30 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99D7C106564A for ; Sat, 18 Apr 2009 07:52:30 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smtp01.one2one.net (smtp01.one2one.net [149.254.200.196]) by mx1.freebsd.org (Postfix) with ESMTP id 5D7E68FC0A for ; Sat, 18 Apr 2009 07:52:30 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from [127.0.0.1] (helo=localhost) by smtpbarns01 with esmtp (Exim 4.50) id 1Lv5Ld-000599-Fg; Sat, 18 Apr 2009 08:52:25 +0100 Received: from smtpbarns01 ([127.0.0.1]) by localhost (smtpbarns01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19664-02; Sat, 18 Apr 2009 08:52:25 +0100 (BST) Received: from [10.217.47.227] (helo=Inbox) by smtpbarns01 with esmtp (Exim 4.50) id 1Lv5La-00058x-HH; Sat, 18 Apr 2009 08:52:25 +0100 MIME-Version: 1.0 content-class: From: Iain Hibbert Date: Sat, 18 Apr 2009 08:51:06 +0100 Importance: normal X-Priority: 3 To: Maksim Yevmenkin Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Message-Id: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: plunky@rya-online.net X-SA-Exim-Scanned: No (on smtpbarns01); SAEximRunCond expanded to false Cc: freebsd-bluetooth@freebsd.org Subject: RE: libhci update X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2009 07:52:30 -0000 > thanks for the feedback. i'm attaching revisited patch. please take a > look and let me know if this is something you happy with. (pls ignore typos & bad formatting, am on mobile device :) Bt_devrecv() should probably take void * for buffer? Also manpage suggests= it will only receive hci events. Do you think its worth doing some validat= ion of received data? (eg return EIO for truncated reads?) Bt_devinquiry() should probably restore the filter after use? Also needs t= o ensure hci event packets are enabled? Bt_devreq() needs to set/restore a filter too In bt_devreq structure event should be uint8_t? Also clen and rlen should b= e size_t Do you think its worth to cook dev_class into a normalised host numeric val= ue rather than 3 bytes ? Probably need to specifically mention that the inquiry response to be relea= sed using free() in manpage? Something i thought about on the train yesterday but can't visualise on the= small screen. For device inquiry did you consider using a callback method = (as per devenum) in stead of returning the structure array? At least i reca= ll my nokia would show the list building (but perhaps that was when it got = the names) and this windows mobile device does show the raw list in progres= s (though stupidly just displays a list of 'unknown device' until it gets t= he names :) Regards, iain=