From owner-cvs-src@FreeBSD.ORG Wed May 18 23:03:45 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D48816A4CE; Wed, 18 May 2005 23:03:45 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7430443D70; Wed, 18 May 2005 23:03:45 +0000 (GMT) (envelope-from emax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4IN3jS6071149; Wed, 18 May 2005 23:03:45 GMT (envelope-from emax@repoman.freebsd.org) Received: (from emax@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4IN3jMv071148; Wed, 18 May 2005 23:03:45 GMT (envelope-from emax) Message-Id: <200505182303.j4IN3jMv071148@repoman.freebsd.org> From: Maksim Yevmenkin Date: Wed, 18 May 2005 23:03:44 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/bluetooth/bthidd parser.y server.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 23:03:45 -0000 emax 2005-05-18 23:03:44 UTC FreeBSD src repository Modified files: usr.sbin/bluetooth/bthidd parser.y server.c Log: Fix problem with session termination. bthidd(8) maintains two L2CAP connections to Bluetooth HID device. As soon as Bluetooth HID device is powered off (or goes out of RF range) the stack will terminate both connections. File descriptors for both connections will become active on next select(2) call. Because bthidd(8) processes file descriptors in order, it will detect descriptor for one of the closed connections first and kill the session. However, there is still a second (active) descriptor that used to point to the same session. bthidd(8) used to assert() if it cant find session by file descriptor, which was wrong. While I'm here fix a couple of typos in parser.y Reported by: Eric Anderson anderson AT centtech DOT com MFC after: 3 days Revision Changes Path 1.4 +2 -2 src/usr.sbin/bluetooth/bthidd/parser.y 1.3 +2 -1 src/usr.sbin/bluetooth/bthidd/server.c